summaryrefslogtreecommitdiff
path: root/tests/apps
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-12-29 21:47:55 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-12-29 21:48:58 +0100
commit34a215d5066f8ae0629070916714801b0ea03eab (patch)
treec56d1fd107828a9c9d09a243b914237f21a37d0c /tests/apps
parente5bcd1d455cd11d3892adf6717a51ae04169f705 (diff)
Deprecated the app argument of apps.get_models.
Use app_config.get_models() instead.
Diffstat (limited to 'tests/apps')
-rw-r--r--tests/apps/tests.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/apps/tests.py b/tests/apps/tests.py
index 4cd35c38cf..a75ae94a75 100644
--- a/tests/apps/tests.py
+++ b/tests/apps/tests.py
@@ -159,7 +159,7 @@ class AppsTests(TestCase):
"""
Makes a new model at runtime and ensures it goes into the right place.
"""
- old_models = apps.get_models(apps.get_app_config("apps").models_module)
+ old_models = list(apps.get_app_config("apps").get_models())
# Construct a new model in a new app registry
body = {}
new_apps = Apps()
@@ -172,10 +172,7 @@ class AppsTests(TestCase):
body['__module__'] = TotallyNormal.__module__
temp_model = type(str("SouthPonies"), (models.Model,), body)
# Make sure it appeared in the right place!
- self.assertEqual(
- old_models,
- apps.get_models(apps.get_app_config("apps").models_module),
- )
+ self.assertListEqual(list(apps.get_app_config("apps").get_models()), old_models)
with self.assertRaises(LookupError):
apps.get_model("apps", "SouthPonies")
self.assertEqual(new_apps.get_model("apps", "SouthPonies"), temp_model)