1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #28269 -- Fixed Model.__init__() crash on models with a field that has an instance only descriptor.

Regression in d2a26c1a90.
This commit is contained in:
Adam Johnson
2017-06-04 22:58:24 +01:00
committed by Tim Graham
parent 36f09c8a29
commit ed244199c7
4 changed files with 21 additions and 4 deletions

View File

@@ -276,4 +276,6 @@ class ParentListTests(SimpleTestCase):
class PropertyNamesTests(SimpleTestCase):
def test_person(self):
# Instance only descriptors don't appear in _property_names.
self.assertEqual(AbstractPerson().test_instance_only_descriptor, 1)
self.assertEqual(AbstractPerson._meta._property_names, frozenset(['pk', 'test_property']))