Use assertIsInstance in tests.

Gives much nicer errors when it fails.
This commit is contained in:
Marc Tamlyn 2013-05-21 10:42:15 +01:00
parent 18856f866c
commit 09f8652765
31 changed files with 87 additions and 87 deletions

View file

@ -360,7 +360,7 @@ class DefaultFiltersTests(TestCase):
escaped = force_escape('<some html & special characters > here')
self.assertEqual(
escaped, '&lt;some html &amp; special characters &gt; here')
self.assertTrue(isinstance(escaped, SafeData))
self.assertIsInstance(escaped, SafeData)
self.assertEqual(
force_escape('<some html & special characters > here ĐÅ€£'),
'&lt;some html &amp; special characters &gt; here'\