comparison forums/tests/test_views.py @ 1206:02181fa5ac9d modernize tip

Update to Django 1.9.
author Brian Neal <bgneal@gmail.com>
date Wed, 22 Jan 2025 17:58:16 -0600
parents 9e803323a0d0
children
comparison
equal deleted inserted replaced
1205:510ef3cbf3e6 1206:02181fa5ac9d
35 follow=True) 35 follow=True)
36 36
37 self.assertEqual(len(response.redirect_chain), 1) 37 self.assertEqual(len(response.redirect_chain), 1)
38 38
39 if response.redirect_chain: 39 if response.redirect_chain:
40 self.assertEqual(response.redirect_chain[0][0], 40 self.assertEqual(
41 'http://testserver' + reverse('forums-new_topic_thanks', 41 response.redirect_chain[0][0],
42 kwargs={'tid': '1'})) 42 reverse('forums-new_topic_thanks', kwargs={'tid': '1'}))
43 self.assertEqual(response.redirect_chain[0][1], 302) 43 self.assertEqual(response.redirect_chain[0][1], 302)
44 44
45 self.assertEqual(response.status_code, 200) 45 self.assertEqual(response.status_code, 200)
46 46
47 forum = Forum.objects.get(slug=forum_slug) 47 forum = Forum.objects.get(slug=forum_slug)