Kaydet (Commit) 36f09c8a authored tarafından Adam Johnson's avatar Adam Johnson Kaydeden (comit) Tim Graham

Added a test for Model._meta._property_names.

üst 0a66aa15
......@@ -39,6 +39,10 @@ class AbstractPerson(models.Model):
class Meta:
abstract = True
@property
def test_property(self):
return 1
class BasePerson(AbstractPerson):
# DATA fields
......
......@@ -272,3 +272,8 @@ class ParentListTests(SimpleTestCase):
self.assertEqual(FirstParent._meta.get_parent_list(), [CommonAncestor])
self.assertEqual(SecondParent._meta.get_parent_list(), [CommonAncestor])
self.assertEqual(Child._meta.get_parent_list(), [FirstParent, SecondParent, CommonAncestor])
class PropertyNamesTests(SimpleTestCase):
def test_person(self):
self.assertEqual(AbstractPerson._meta._property_names, frozenset(['pk', 'test_property']))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment