magic-removal: Updated one_to_one unit tests to use self.restaurant instead of self.get_restaurant(), etc.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3310377501
commit
fe94847e2c
|
@ -21,14 +21,14 @@ class Restaurant(models.Model):
|
|||
serves_pizza = models.BooleanField()
|
||||
|
||||
def __repr__(self):
|
||||
return "%s the restaurant" % self.get_place().name
|
||||
return "%s the restaurant" % self.place.name
|
||||
|
||||
class Waiter(models.Model):
|
||||
restaurant = models.ForeignKey(Restaurant)
|
||||
name = models.CharField(maxlength=50)
|
||||
|
||||
def __repr__(self):
|
||||
return "%s the waiter at %r" % (self.name, self.get_restaurant())
|
||||
return "%s the waiter at %r" % (self.name, self.restaurant)
|
||||
|
||||
API_TESTS = """
|
||||
# Create a couple of Places.
|
||||
|
|
Loading…
Reference in New Issue