summaryrefslogtreecommitdiff
path: root/tests/model_meta
diff options
context:
space:
mode:
authorDaniel Pyrathon <pirosb3@gmail.com>2015-02-10 18:15:54 +0100
committerTim Graham <timograham@gmail.com>2015-02-10 19:55:06 -0500
commit19188826b4aa989475418f1ea9bf8631b04da1e8 (patch)
tree0a005a39819ae21875ea7f6b3eaecb4ece219662 /tests/model_meta
parent1fbe8a2de334bfec5e9b77e36f8a3c1cf2cd70be (diff)
downloaddjango-19188826b4aa989475418f1ea9bf8631b04da1e8.tar.gz
Fixed #24146 -- Allowed model._meta.get_field() to be used after apps.models_ready
Diffstat (limited to 'tests/model_meta')
-rw-r--r--tests/model_meta/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/model_meta/tests.py b/tests/model_meta/tests.py
index 4a08b408c6..ef526b7bc4 100644
--- a/tests/model_meta/tests.py
+++ b/tests/model_meta/tests.py
@@ -178,7 +178,7 @@ class GetFieldByNameTests(OptionsBaseTests):
opts = Person._meta
# If apps registry is not ready, get_field() searches over only
# forward fields.
- opts.apps.ready = False
+ opts.apps.models_ready = False
try:
# 'data_abstract' is a forward field, and therefore will be found
self.assertTrue(opts.get_field('data_abstract'))
@@ -191,7 +191,7 @@ class GetFieldByNameTests(OptionsBaseTests):
with self.assertRaisesMessage(FieldDoesNotExist, msg):
opts.get_field('relating_baseperson')
finally:
- opts.apps.ready = True
+ opts.apps.models_ready = True
class RelationTreeTests(TestCase):