summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-08 00:13:52 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-08 00:13:52 +0000
commit89920e058fcb673ff82ae67a41566216895c8bd3 (patch)
treee9f37dc294987c1a61211726f3c6099dd2ad9466 /tests
parent58ab678d354a04bcbf0a568f1950a4f41efbae12 (diff)
Fixed #2108 -- do not try to save an empty model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
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()
+
+"""