1
0
mirror of https://github.com/django/django.git synced 2025-07-05 10:19:20 +00:00

magic-removal: added a couple of constructor tests for model_inheritance.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2006-03-08 21:05:10 +00:00
parent 4b0fcefbc2
commit 7ec0ebc022

View File

@ -34,4 +34,19 @@ API_TESTS = """
>>> [f.name for f in ItalianRestaurant._meta.fields]
['id', 'name', 'address', 'serves_hot_dogs', 'serves_pizza', 'serves_gnocchi']
# Create a couple of Places.
>>> p1 = Place(name='Master Shakes', address='666 W. Jersey')
>>> p1.save()
>>> p2 = Place(name='Ace Hardware', address='1013 N. Ashland')
>>> p2.save()
# Test constructor for Restaurant.
>>> r = Restaurant(name='Demon Dogs', address='944 W. Fullerton', serves_hot_dogs=True, serves_pizza=False)
>>> r.save()
# Test the constructor for ItalianRestaurant.
>>> ir = ItalianRestaurant(name='Ristorante Miron', address='1234 W. Elm', serves_hot_dogs=False, serves_pizza=False, serves_gnocchi=True)
>>> ir.save()
"""