summaryrefslogtreecommitdiff
path: root/tests/modeltests/custom_columns/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modeltests/custom_columns/models.py')
-rw-r--r--tests/modeltests/custom_columns/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/modeltests/custom_columns/models.py b/tests/modeltests/custom_columns/models.py
index 4958517e69..7d8c52d137 100644
--- a/tests/modeltests/custom_columns/models.py
+++ b/tests/modeltests/custom_columns/models.py
@@ -12,7 +12,7 @@ class Person(models.Model):
first_name = models.CharField(maxlength=30, db_column='firstname')
last_name = models.CharField(maxlength=30, db_column='last')
- def __repr__(self):
+ def __str__(self):
return '%s %s' % (self.first_name, self.last_name)
API_TESTS = """
@@ -24,13 +24,13 @@ API_TESTS = """
1
>>> Person.objects.all()
-[John Smith]
+[<Person: John Smith>]
>>> Person.objects.filter(first_name__exact='John')
-[John Smith]
+[<Person: John Smith>]
>>> Person.objects.get(first_name__exact='John')
-John Smith
+<Person: John Smith>
>>> Person.objects.filter(firstname__exact='John')
Traceback (most recent call last):