diff options
| author | Simon Charette <charette.s@gmail.com> | 2017-11-29 01:06:45 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-11-30 09:28:44 -0500 |
| commit | e50add6ca1605dcc06c8c5a5770342779a4d5124 (patch) | |
| tree | 9591b2b0315302b9a81a395f19167b765a27faf4 /tests/model_fields | |
| parent | f0a68c25118786d47041d0a435b2afa953be3c86 (diff) | |
Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey pointing to a MTI model.
Regression in b9f8635f58ad743995cad2081b3dc395e55761e5.
Diffstat (limited to 'tests/model_fields')
| -rw-r--r-- | tests/model_fields/test_foreignkey.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/model_fields/test_foreignkey.py b/tests/model_fields/test_foreignkey.py index 1617f7f310..7c99d8e34a 100644 --- a/tests/model_fields/test_foreignkey.py +++ b/tests/model_fields/test_foreignkey.py @@ -93,3 +93,13 @@ class ForeignKeyTests(TestCase): assert_app_model_resolved('model_fields') assert_app_model_resolved('tests') + + @isolate_apps('model_fields') + def test_to_python(self): + class Foo(models.Model): + pass + + class Bar(models.Model): + fk = models.ForeignKey(Foo, models.CASCADE) + + self.assertEqual(Bar._meta.get_field('fk').to_python('1'), 1) |
