Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[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
  • Loading branch information...
commit 15fb61c62ce403bc2ba7f63c5f519a988ce2c5d2 1 parent 8e73302
@aaugustin aaugustin authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/regressiontests/app_loading/tests.py
View
4 tests/regressiontests/app_loading/tests.py
@@ -5,7 +5,7 @@
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 @@ def setUp(self):
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'])
Please sign in to comment.
Something went wrong with that request. Please try again.