2009-03-10 05:51:06 +00:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import time
|
|
|
|
|
|
|
|
from django.conf import Settings
|
|
|
|
|
|
|
|
__test__ = {"API_TESTS": """
|
2009-03-08 09:39:48 +00:00
|
|
|
Test the globbing of INSTALLED_APPS.
|
|
|
|
|
|
|
|
>>> old_sys_path = sys.path
|
|
|
|
>>> sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
2009-03-10 05:51:06 +00:00
|
|
|
>>> old_tz = os.environ["TZ"]
|
|
|
|
>>> settings = Settings('test_settings')
|
2009-03-08 09:39:48 +00:00
|
|
|
|
2009-03-10 05:51:06 +00:00
|
|
|
>>> settings.INSTALLED_APPS
|
2009-03-08 09:39:48 +00:00
|
|
|
['parent.app', 'parent.app1']
|
|
|
|
|
|
|
|
>>> sys.path = old_sys_path
|
|
|
|
|
2009-03-10 05:51:06 +00:00
|
|
|
# Undo a side-effect of installing a new settings object.
|
|
|
|
>>> if hasattr(time, "tzset"):
|
|
|
|
... os.environ["TZ"] = old_tz
|
|
|
|
... time.tzset()
|
|
|
|
|
|
|
|
"""}
|
2009-03-08 09:39:48 +00:00
|
|
|
|