Monkeypatch some more generics. (#1050)

* Add generic monkeypatching for `FileProxyMixin`.

This fixes `TypeError: 'type' object is not subscriptable` for
`django.core.files.File` and `django.core.files.base.ContentFile`.

* Add generic monkeypatching for `ForeignKey`.

This matches the change coming in Django 4.1.

See https://github.com/django/django/pull/15571
This commit is contained in:
Nick Pope
2022-07-05 23:19:51 +01:00
committed by GitHub
parent 516deba2fa
commit e8d52fe7da
2 changed files with 7 additions and 0 deletions

View File

@@ -82,6 +82,8 @@ def test_patched_extra_classes_generics(make_generic_classes: _MakeGenericClasse
(3, 0),
(3, 1),
(3, 2),
(4, 0),
(4, 1),
],
)
def test_patched_version_specific(