Skip to content

Commit

Permalink
magic-removal: added a couple of constructor tests for model_inherita…
Browse files Browse the repository at this point in the history
…nce.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jkocherhans committed Mar 8, 2006
1 parent 4b0fcef commit 7ec0ebc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/modeltests/model_inheritance/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,19 @@ def __repr__(self):
>>> [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()
"""

0 comments on commit 7ec0ebc

Please sign in to comment.