diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-30 23:53:54 +0100 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-30 23:59:34 +0100 |
commit | bfcc686d22df10c268752635947dd242317ba156 (patch) | |
tree | 83220d8f86a7c0589d8754f7577bced3d8fd0655 /tests/apps | |
parent | ec020cab7ef4b1943a8fe9a4d6872f7e874db707 (diff) | |
download | django-bfcc686d22df10c268752635947dd242317ba156.tar.gz |
Removed the only_with_models_module argument of get_model[s].
Now that the refactorings are complete, it isn't particularly useful any
more, nor very well named. Let's keep the API as simple as possible.
Fixed #21689.
Diffstat (limited to 'tests/apps')
-rw-r--r-- | tests/apps/tests.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/apps/tests.py b/tests/apps/tests.py index 326ddcb6ab..2a41acf2e8 100644 --- a/tests/apps/tests.py +++ b/tests/apps/tests.py @@ -26,8 +26,6 @@ SOME_INSTALLED_APPS_NAMES = [ 'django.contrib.auth', ] + SOME_INSTALLED_APPS[2:] -SOME_INSTALLED_APPS_WTH_MODELS_NAMES = SOME_INSTALLED_APPS_NAMES[:4] - class AppsTests(TestCase): @@ -94,16 +92,6 @@ class AppsTests(TestCase): SOME_INSTALLED_APPS_NAMES) @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS) - def test_get_app_configs_with_models(self): - """ - Tests get_app_configs(only_with_models_module=True). - """ - app_configs = apps.get_app_configs(only_with_models_module=True) - self.assertListEqual( - [app_config.name for app_config in app_configs], - SOME_INSTALLED_APPS_WTH_MODELS_NAMES) - - @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS) def test_get_app_config(self): """ Tests get_app_config(). @@ -118,17 +106,6 @@ class AppsTests(TestCase): apps.get_app_config('webdesign') @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS) - def test_get_app_config_with_models(self): - """ - Tests get_app_config(only_with_models_module=True). - """ - app_config = apps.get_app_config('admin', only_with_models_module=True) - self.assertEqual(app_config.name, 'django.contrib.admin') - - with self.assertRaises(LookupError): - apps.get_app_config('staticfiles', only_with_models_module=True) - - @override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS) def test_has_app(self): self.assertTrue(apps.has_app('django.contrib.admin')) self.assertTrue(apps.has_app('django.contrib.staticfiles')) |