summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-03-24 13:56:48 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-03-24 13:56:48 +0000
commit15fb61c62ce403bc2ba7f63c5f519a988ce2c5d2 (patch)
treeb2e04b3560958c73954082a2ff26d080b20155ec
parent8e73302070d69b49c65390d7a8c3c3a367c0b3d9 (diff)
[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
-rw-r--r--tests/regressiontests/app_loading/tests.py4
1 files changed, 3 insertions, 1 deletions
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'])