summaryrefslogtreecommitdiff
path: root/tests/no_models
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-12-14 18:51:58 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-12-17 10:17:45 +0100
commit5ba743e26230ef4c63069efc92c5844fd98995dc (patch)
treeecbf852871744ffc77043bc6159f71e0a09d414f /tests/no_models
parent69039becde74308d6218c72c1e410cd0049fd2bd (diff)
downloaddjango-5ba743e26230ef4c63069efc92c5844fd98995dc.tar.gz
Made it possible to create apps without a models module.
This commit reverts f44c4a5d0f and 39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
Diffstat (limited to 'tests/no_models')
-rw-r--r--tests/no_models/__init__.py0
-rw-r--r--tests/no_models/tests.py10
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/no_models/__init__.py b/tests/no_models/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/no_models/__init__.py
diff --git a/tests/no_models/tests.py b/tests/no_models/tests.py
new file mode 100644
index 0000000000..f9ff80485e
--- /dev/null
+++ b/tests/no_models/tests.py
@@ -0,0 +1,10 @@
+from django.apps import app_cache
+from django.test import TestCase
+
+
+class NoModelTests(TestCase):
+
+ def test_no_models(self):
+ """Test that it's possible to load an app with no models.py file."""
+ app_config = app_cache.get_app_config('no_models')
+ self.assertIsNone(app_config.models_module)