1
0
mirror of https://github.com/django/django.git synced 2025-03-28 18:20:49 +00:00

[1.7.x] Fixed a deprecation warning on Python 3.

Backport of c19bbefca2 from master
This commit is contained in:
Tim Graham 2014-03-27 06:59:54 -04:00
parent fe61ba91c7
commit 3d74f1f64a

View File

@ -218,7 +218,7 @@ class SimpleLazyObjectTestCase(LazyObjectTestCase):
obj = self.lazy_wrap(42)
# __repr__ contains __repr__ of setup function and does not evaluate
# the SimpleLazyObject
self.assertRegexpMatches(repr(obj), '^<SimpleLazyObject:')
six.assertRegex(self, repr(obj), '^<SimpleLazyObject:')
self.assertIs(obj._wrapped, empty) # make sure evaluation hasn't been triggered
self.assertEqual(obj, 42) # evaluate the lazy object