mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Use assertIsInstance in tests.
Gives much nicer errors when it fails.
This commit is contained in:
@@ -68,7 +68,7 @@ class TestUtilsSimpleLazyObject(TestCase):
|
||||
|
||||
# Second, for an evaluated SimpleLazyObject
|
||||
name = x.name # evaluate
|
||||
self.assertTrue(isinstance(x._wrapped, _ComplexObject))
|
||||
self.assertIsInstance(x._wrapped, _ComplexObject)
|
||||
# __repr__ contains __repr__ of wrapped object
|
||||
self.assertEqual("<SimpleLazyObject: %r>" % x._wrapped, repr(x))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user