From bfcc686d22df10c268752635947dd242317ba156 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 30 Dec 2013 23:53:54 +0100 Subject: 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. --- tests/apps/tests.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'tests/apps') 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): @@ -93,16 +91,6 @@ class AppsTests(TestCase): [app_config.name for app_config in app_configs], 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): """ @@ -117,17 +105,6 @@ class AppsTests(TestCase): with self.assertRaises(LookupError): 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')) -- cgit v1.3