1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Migrated empty doctests. Thanks to Alex Gaynor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13789 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-09-12 20:05:07 +00:00
parent 21e7987c4c
commit 45651dcb05
2 changed files with 16 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
from django.test import TestCase
from models import Empty
class EmptyModelTests(TestCase):
def test_empty(self):
m = Empty()
self.assertEqual(m.id, None)
m.save()
m2 = Empty.objects.create()
self.assertEqual(len(Empty.objects.all()), 2)
self.assertTrue(m.id is not None)
existing = Empty(m.id)
existing.save()