summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/empty/__init__.py0
-rw-r--r--tests/modeltests/empty/models.py17
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/modeltests/empty/__init__.py b/tests/modeltests/empty/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/modeltests/empty/__init__.py
diff --git a/tests/modeltests/empty/models.py b/tests/modeltests/empty/models.py
new file mode 100644
index 0000000000..2d0c42983b
--- /dev/null
+++ b/tests/modeltests/empty/models.py
@@ -0,0 +1,17 @@
+"""
+Empty model tests
+
+These test that things behave sensibly for the rare corner-case of a model with
+no fields.
+"""
+
+from django.db import models
+
+class Empty(models.Model):
+ pass
+
+API_TESTS = """
+>>> m = Empty()
+>>> m.save()
+
+"""