thirdparty/google_appengine/lib/django/tests/modeltests/empty/models.py
author james@jamess-macbook-air.local
Tue, 30 Jun 2009 03:02:53 -0700
changeset 2455 a023b71ce125
parent 109 620f9b141567
permissions -rwxr-xr-x
fixed critical errors related to survey subclassing and renaming of deadline and opening properties, and surveys in sidebar are now marked as such and have a red color if untaken

"""
39. 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

__test__ = {'API_TESTS':"""
>>> m = Empty()
>>> m.id
>>> m.save()
>>> m2 = Empty()
>>> m2.save()
>>> len(Empty.objects.all())
2
>>> m.id is not None
True
>>> existing = Empty(m.id)
>>> existing.save()

"""}