Django

Code

Changeset 2507

Show
Ignore:
Timestamp:
03/08/06 15:05:10 (3 years ago)
Author:
jkocherhans
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/tests/modeltests/model_inheritance/models.py

    r2506 r2507  
    3535['id', 'name', 'address', 'serves_hot_dogs', 'serves_pizza', 'serves_gnocchi'] 
    3636 
     37# Create a couple of Places. 
     38>>> p1 = Place(name='Master Shakes', address='666 W. Jersey') 
     39>>> p1.save() 
     40>>> p2 = Place(name='Ace Hardware', address='1013 N. Ashland') 
     41>>> p2.save() 
     42 
     43# Test constructor for Restaurant. 
     44>>> r = Restaurant(name='Demon Dogs', address='944 W. Fullerton', serves_hot_dogs=True, serves_pizza=False) 
     45>>> r.save() 
     46 
     47# Test the constructor for ItalianRestaurant. 
     48>>> ir = ItalianRestaurant(name='Ristorante Miron', address='1234 W. Elm', serves_hot_dogs=False, serves_pizza=False, serves_gnocchi=True) 
     49>>> ir.save() 
     50 
     51 
    3752"""