summaryrefslogtreecommitdiff
path: root/tests/urlpatterns_reverse
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2013-05-21 02:51:14 -0700
committerMarc Tamlyn <marc.tamlyn@gmail.com>2013-05-21 02:51:14 -0700
commitb632baac3c56101d59f6279767e5f3418643e425 (patch)
treee47a80f8ea9f65a992db8ed589d47158a7adfa31 /tests/urlpatterns_reverse
parent60585f6621563627220eeb5bbac993b92d76a704 (diff)
parent09f865276554f35060ff939722ec4cefd578edf6 (diff)
Merge pull request #1192 from mjtamlyn/assertIsInstance
Use assertIsInstance in test code.
Diffstat (limited to 'tests/urlpatterns_reverse')
-rw-r--r--tests/urlpatterns_reverse/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py
index 24f96fac7c..d5d9b3a709 100644
--- a/tests/urlpatterns_reverse/tests.py
+++ b/tests/urlpatterns_reverse/tests.py
@@ -246,7 +246,7 @@ class ResolverTests(unittest.TestCase):
self.assertEqual(len(e.args[0]['tried']), len(url_types_names), 'Wrong number of tried URLs returned. Expected %s, got %s.' % (len(url_types_names), len(e.args[0]['tried'])))
for tried, expected in zip(e.args[0]['tried'], url_types_names):
for t, e in zip(tried, expected):
- self.assertTrue(isinstance(t, e['type']), str('%s is not an instance of %s') % (t, e['type']))
+ self.assertIsInstance(t, e['type']), str('%s is not an instance of %s') % (t, e['type'])
if 'name' in e:
if not e['name']:
self.assertTrue(t.name is None, 'Expected no URL name but found %s.' % t.name)
@@ -278,11 +278,11 @@ class ReverseShortcutTests(TestCase):
return "/hi-there/"
res = redirect(FakeObj())
- self.assertTrue(isinstance(res, HttpResponseRedirect))
+ self.assertIsInstance(res, HttpResponseRedirect)
self.assertEqual(res.url, '/hi-there/')
res = redirect(FakeObj(), permanent=True)
- self.assertTrue(isinstance(res, HttpResponsePermanentRedirect))
+ self.assertIsInstance(res, HttpResponsePermanentRedirect)
self.assertEqual(res.url, '/hi-there/')
def test_redirect_to_view_name(self):