summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-10 05:55:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-10 05:55:55 +0000
commitea350187a5dc52861d85d513c846bd1f062513be (patch)
tree86d3da0ffcd8d2fa2f07c15d82d1de4ab81f5114 /tests/regressiontests
parentc545e88b817f299c7bb04c68a392cb5d52e7109b (diff)
[1.0.X] Fixed #10439 -- Fixed a subtle test failure caused by r9995.
Thanks to Ramiro Morales for debugging what was going on here. Backport of r10015 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/app_loading/tests.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/regressiontests/app_loading/tests.py b/tests/regressiontests/app_loading/tests.py
index afa3049330..444de10d79 100644
--- a/tests/regressiontests/app_loading/tests.py
+++ b/tests/regressiontests/app_loading/tests.py
@@ -1,18 +1,27 @@
-"""
+import os
+import sys
+import time
+
+from django.conf import Settings
+
+__test__ = {"API_TESTS": """
Test the globbing of INSTALLED_APPS.
->>> import os, sys
>>> old_sys_path = sys.path
>>> sys.path.append(os.path.dirname(os.path.abspath(__file__)))
->>> from django.conf import Settings
+>>> old_tz = os.environ["TZ"]
+>>> settings = Settings('test_settings')
->>> s = Settings('test_settings')
-
->>> s.INSTALLED_APPS
+>>> settings.INSTALLED_APPS
['parent.app', 'parent.app1']
>>> sys.path = old_sys_path
-"""
+# Undo a side-effect of installing a new settings object.
+>>> if hasattr(time, "tzset"):
+... os.environ["TZ"] = old_tz
+... time.tzset()
+
+"""}