From 15fb61c62ce403bc2ba7f63c5f519a988ce2c5d2 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 24 Mar 2012 13:56:48 +0000 Subject: [PATCH] [1.3.X] Avoided a test failure if the settings module used to run the test suite is called "test_settings". The globbing feature and this test were removed in 1.4. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17806 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/app_loading/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/app_loading/tests.py b/tests/regressiontests/app_loading/tests.py index 78e6519e35..420560ab65 100644 --- a/tests/regressiontests/app_loading/tests.py +++ b/tests/regressiontests/app_loading/tests.py @@ -5,7 +5,7 @@ import time from django.conf import Settings from django.db.models.loading import cache, load_app -from django.utils.unittest import TestCase +from django.utils.unittest import TestCase, skipIf class InstalledAppsGlobbingTest(TestCase): @@ -14,6 +14,8 @@ class InstalledAppsGlobbingTest(TestCase): sys.path.append(os.path.dirname(os.path.abspath(__file__))) self.OLD_TZ = os.environ.get("TZ") + @skipIf('test_settings' in sys.modules, + 'A toplevel module named test_settings already exists') def test_globbing(self): settings = Settings('test_settings') self.assertEqual(settings.INSTALLED_APPS, ['parent.app', 'parent.app1', 'parent.app_2'])