summaryrefslogtreecommitdiff
path: root/tests/str/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/str/tests.py')
-rw-r--r--tests/str/tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/str/tests.py b/tests/str/tests.py
index db21ccb2d9..181906fa0d 100644
--- a/tests/str/tests.py
+++ b/tests/str/tests.py
@@ -30,5 +30,8 @@ class SimpleTests(TestCase):
# coerce the returned value.
self.assertIsInstance(obj.__str__(), str)
self.assertIsInstance(obj.__repr__(), str)
- self.assertEqual(str(obj), 'Default object')
- self.assertEqual(repr(obj), '<Default: Default object>')
+ self.assertEqual(str(obj), 'Default object (None)')
+ self.assertEqual(repr(obj), '<Default: Default object (None)>')
+ obj2 = Default(pk=100)
+ self.assertEqual(str(obj2), 'Default object (100)')
+ self.assertEqual(repr(obj2), '<Default: Default object (100)>')