Fixed #10439 -- Fixed a subtle test failure caused by r9994.
Thanks to Ramiro Morales for debugging what was going on here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0516c5d921
commit
d0fff8ccd4
|
@ -1,18 +1,27 @@
|
||||||
"""
|
import os
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
from django.conf import Settings
|
||||||
|
|
||||||
|
__test__ = {"API_TESTS": """
|
||||||
Test the globbing of INSTALLED_APPS.
|
Test the globbing of INSTALLED_APPS.
|
||||||
|
|
||||||
>>> import os, sys
|
|
||||||
>>> old_sys_path = sys.path
|
>>> old_sys_path = sys.path
|
||||||
>>> sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
>>> 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')
|
>>> settings.INSTALLED_APPS
|
||||||
|
|
||||||
>>> s.INSTALLED_APPS
|
|
||||||
['parent.app', 'parent.app1']
|
['parent.app', 'parent.app1']
|
||||||
|
|
||||||
>>> sys.path = old_sys_path
|
>>> 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()
|
||||||
|
|
||||||
|
"""}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue