diff options
| author | Ion Scerbatiuc <ion@rover.com> | 2015-08-04 16:23:05 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-05 15:01:32 -0400 |
| commit | 520802160a6c9e9dbe9f5859ae7e084b9000f850 (patch) | |
| tree | f4d3c608ec14898bf518575a73f5c0632be20be8 /tests/postgres_tests | |
| parent | 244404227e8a1c5e241658ef0df789a28ed3bbc6 (diff) | |
Fixed #25226 -- Set the model attribute on ArrayField's base_field
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_array.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index d152f76b3d..0a41bf1bdd 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -97,6 +97,12 @@ class TestSaveLoad(PostgreSQLTestCase): self.assertEqual(instance.uuids, loaded.uuids) self.assertEqual(instance.decimals, loaded.decimals) + def test_model_set_on_base_field(self): + instance = IntegerArrayModel() + field = instance._meta.get_field('field') + self.assertEqual(field.model, IntegerArrayModel) + self.assertEqual(field.base_field.model, IntegerArrayModel) + class TestQuerying(PostgreSQLTestCase): |
