diff options
| author | Michal Petrucha <michal.petrucha@koniiiik.org> | 2016-03-20 18:10:55 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-13 10:10:53 -0400 |
| commit | c339a5a6f72690cd90d5a653dc108fbb60274a20 (patch) | |
| tree | 41b1deef69d5c35b2fc78c67a31d1e647774ae76 /tests/model_meta | |
| parent | 47fbbc33de805c803c39483344854caa2890c32c (diff) | |
Refs #16508 -- Renamed the current "virtual" fields to "private".
The only reason why GenericForeignKey and GenericRelation are stored
separately inside _meta is that they need to be cloned for every model
subclass, but that's not true for any other virtual field. Actually,
it's only true for GenericRelation.
Diffstat (limited to 'tests/model_meta')
| -rw-r--r-- | tests/model_meta/results.py | 2 | ||||
| -rw-r--r-- | tests/model_meta/tests.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/model_meta/results.py b/tests/model_meta/results.py index 50cb59a169..db8ccf650e 100644 --- a/tests/model_meta/results.py +++ b/tests/model_meta/results.py @@ -863,7 +863,7 @@ TEST_RESULTS = { 'm2m_concrete_rel', ], }, - 'virtual_fields': { + 'private_fields': { AbstractPerson: [ 'generic_relation_abstract', 'content_object_abstract', diff --git a/tests/model_meta/tests.py b/tests/model_meta/tests.py index d662c8257c..9a692ffdd2 100644 --- a/tests/model_meta/tests.py +++ b/tests/model_meta/tests.py @@ -157,11 +157,11 @@ class RelatedObjectsTests(OptionsBaseTests): ) -class VirtualFieldsTests(OptionsBaseTests): +class PrivateFieldsTests(OptionsBaseTests): - def test_virtual_fields(self): - for model, expected_names in TEST_RESULTS['virtual_fields'].items(): - objects = model._meta.virtual_fields + def test_private_fields(self): + for model, expected_names in TEST_RESULTS['private_fields'].items(): + objects = model._meta.private_fields self.assertEqual(sorted([f.name for f in objects]), sorted(expected_names)) |
