mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #31223 -- Added __class_getitem__() to ForeignKey.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user