mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[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:
		| @@ -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']) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user