summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-08 09:41:37 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-08 09:41:37 +0000
commit7dcf651bc5ea1b8da5f6b5044b71552dcdaf73cb (patch)
treedf20d3079fef571013240a67303d440d7c7a6307 /tests
parent34b530fce71bc9d3ef811a4dbd183334a1bfb917 (diff)
[1.0.X] Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits in names.
Patch from carljm. Backport of r9994 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/app_loading/__init__.py0
-rw-r--r--tests/regressiontests/app_loading/models.py0
-rw-r--r--tests/regressiontests/app_loading/parent/__init__.py1
-rw-r--r--tests/regressiontests/app_loading/parent/app/__init__.py1
-rw-r--r--tests/regressiontests/app_loading/parent/app1/__init__.py1
-rw-r--r--tests/regressiontests/app_loading/test_settings.py3
-rw-r--r--tests/regressiontests/app_loading/tests.py18
7 files changed, 24 insertions, 0 deletions
diff --git a/tests/regressiontests/app_loading/__init__.py b/tests/regressiontests/app_loading/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/regressiontests/app_loading/__init__.py
diff --git a/tests/regressiontests/app_loading/models.py b/tests/regressiontests/app_loading/models.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/regressiontests/app_loading/models.py
diff --git a/tests/regressiontests/app_loading/parent/__init__.py b/tests/regressiontests/app_loading/parent/__init__.py
new file mode 100644
index 0000000000..51c842b5ba
--- /dev/null
+++ b/tests/regressiontests/app_loading/parent/__init__.py
@@ -0,0 +1 @@
+# not empty to make SVN happy
diff --git a/tests/regressiontests/app_loading/parent/app/__init__.py b/tests/regressiontests/app_loading/parent/app/__init__.py
new file mode 100644
index 0000000000..51c842b5ba
--- /dev/null
+++ b/tests/regressiontests/app_loading/parent/app/__init__.py
@@ -0,0 +1 @@
+# not empty to make SVN happy
diff --git a/tests/regressiontests/app_loading/parent/app1/__init__.py b/tests/regressiontests/app_loading/parent/app1/__init__.py
new file mode 100644
index 0000000000..51c842b5ba
--- /dev/null
+++ b/tests/regressiontests/app_loading/parent/app1/__init__.py
@@ -0,0 +1 @@
+# not empty to make SVN happy
diff --git a/tests/regressiontests/app_loading/test_settings.py b/tests/regressiontests/app_loading/test_settings.py
new file mode 100644
index 0000000000..e956311b0a
--- /dev/null
+++ b/tests/regressiontests/app_loading/test_settings.py
@@ -0,0 +1,3 @@
+INSTALLED_APPS = (
+ 'parent.*',
+)
diff --git a/tests/regressiontests/app_loading/tests.py b/tests/regressiontests/app_loading/tests.py
new file mode 100644
index 0000000000..afa3049330
--- /dev/null
+++ b/tests/regressiontests/app_loading/tests.py
@@ -0,0 +1,18 @@
+"""
+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
+
+>>> s = Settings('test_settings')
+
+>>> s.INSTALLED_APPS
+['parent.app', 'parent.app1']
+
+>>> sys.path = old_sys_path
+
+"""
+