From 0de89b6f8d4d8f5fd232d6c5412260b0d79a760a Mon Sep 17 00:00:00 2001 From: Collin Anderson Date: Fri, 22 Apr 2022 08:13:12 -0400 Subject: Refs #31223 -- Added __class_getitem__() to ForeignKey. --- tests/model_fields/test_foreignkey.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/model_fields') diff --git a/tests/model_fields/test_foreignkey.py b/tests/model_fields/test_foreignkey.py index a5b646ae86..ca8eff3540 100644 --- a/tests/model_fields/test_foreignkey.py +++ b/tests/model_fields/test_foreignkey.py @@ -164,3 +164,6 @@ class ForeignKeyTests(TestCase): class MyModel(models.Model): child = models.ForeignKey(1, models.CASCADE) + + def test_manager_class_getitem(self): + self.assertIs(models.ForeignKey["Foo"], models.ForeignKey) -- cgit v1.3