[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
This commit is contained in:
Aymeric Augustin 2012-03-24 13:56:48 +00:00
parent 8e73302070
commit 15fb61c62c
1 changed files with 3 additions and 1 deletions

View File

@ -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'])