From 7ec0ebc022e0eaf70d417729a084af80b258bcd9 Mon Sep 17 00:00:00 2001 From: Joseph Kocherhans Date: Wed, 8 Mar 2006 21:05:10 +0000 Subject: [PATCH] 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 --- tests/modeltests/model_inheritance/models.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/modeltests/model_inheritance/models.py b/tests/modeltests/model_inheritance/models.py index 27e1df9c01..cdc4b4e2ac 100644 --- a/tests/modeltests/model_inheritance/models.py +++ b/tests/modeltests/model_inheritance/models.py @@ -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() + + """