From 89920e058fcb673ff82ae67a41566216895c8bd3 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Thu, 8 Jun 2006 00:13:52 +0000 Subject: 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 --- tests/modeltests/empty/__init__.py | 0 tests/modeltests/empty/models.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/modeltests/empty/__init__.py create mode 100644 tests/modeltests/empty/models.py (limited to 'tests') diff --git a/tests/modeltests/empty/__init__.py b/tests/modeltests/empty/__init__.py new file mode 100644 index 0000000000..e69de29bb2 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() + +""" -- cgit v1.3