mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
This commit is contained in:
committed by
Tim Graham
parent
749d23251b
commit
fb48eb0581
@@ -202,8 +202,8 @@ class StateTests(TestCase):
|
||||
))
|
||||
|
||||
new_apps = project_state.apps
|
||||
self.assertEqual(new_apps.get_model("migrations", "Tag")._meta.get_field_by_name("name")[0].max_length, 100)
|
||||
self.assertEqual(new_apps.get_model("migrations", "Tag")._meta.get_field_by_name("hidden")[0].null, False)
|
||||
self.assertEqual(new_apps.get_model("migrations", "Tag")._meta.get_field("name").max_length, 100)
|
||||
self.assertEqual(new_apps.get_model("migrations", "Tag")._meta.get_field("hidden").null, False)
|
||||
|
||||
self.assertEqual(len(new_apps.get_model("migrations", "SubTag")._meta.local_fields), 2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user