diff polls/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 8789299c75b1
children
line wrap: on
line diff
--- a/polls/tests/test_views.py	Sat Jan 04 21:34:31 2025 -0600
+++ b/polls/tests/test_views.py	Wed Jan 22 17:58:16 2025 -0600
@@ -99,8 +99,9 @@
 
         self.assertEqual(len(response.redirect_chain), 1)
         if response.redirect_chain:
-            self.assertEqual(response.redirect_chain[0][0],
-                    'http://testserver' + reverse('polls-detail', kwargs={'poll_id': poll.id}))
+            self.assertEqual(
+                    response.redirect_chain[0][0],
+                    reverse('polls-detail', kwargs={'poll_id': poll.id}))
             self.assertEqual(response.redirect_chain[0][1], 302)
 
         self.assertEqual(response.status_code, 200)
@@ -120,8 +121,9 @@
 
         self.assertEqual(len(response.redirect_chain), 1)
         if response.redirect_chain:
-            self.assertEqual(response.redirect_chain[0][0],
-                'http://testserver' + reverse('polls-detail', kwargs={'poll_id': poll.id}))
+            self.assertEqual(
+                    response.redirect_chain[0][0],
+                    reverse('polls-detail', kwargs={'poll_id': poll.id}))
             self.assertEqual(response.redirect_chain[0][1], 302)
 
         self.assertEqual(response.status_code, 404)
@@ -146,8 +148,9 @@
 
         self.assertEqual(len(response.redirect_chain), 1)
         if response.redirect_chain:
-            self.assertEqual(response.redirect_chain[0][0],
-                'http://testserver' + reverse('polls-detail', kwargs={'poll_id': poll.id}))
+            self.assertEqual(
+                    response.redirect_chain[0][0],
+                    reverse('polls-detail', kwargs={'poll_id': poll.id}))
             self.assertEqual(response.redirect_chain[0][1], 302)
 
         self.assertEqual(response.status_code, 200)
@@ -165,8 +168,9 @@
 
         self.assertEqual(len(response.redirect_chain), 1)
         if response.redirect_chain:
-            self.assertEqual(response.redirect_chain[0][0],
-                'http://testserver' + reverse('polls-detail', kwargs={'poll_id': poll.id}))
+            self.assertEqual(
+                    response.redirect_chain[0][0],
+                    reverse('polls-detail', kwargs={'poll_id': poll.id}))
             self.assertEqual(response.redirect_chain[0][1], 302)
 
         self.assertEqual(response.status_code, 200)