From 3d110192e82e78db152105346e9e52b32025c98d Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Sun, 18 Apr 2021 14:39:10 -0700 Subject: [PATCH] add PATH_INFO test to accounts/tests/test_password_change_view.py --- accounts/tests/test_password_change_view.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accounts/tests/test_password_change_view.py b/accounts/tests/test_password_change_view.py index 725910b..b8ed744 100644 --- a/accounts/tests/test_password_change_view.py +++ b/accounts/tests/test_password_change_view.py @@ -22,6 +22,7 @@ class PasswordChangeViewTestCase(TestCase): user_a = User.objects.get(username='user_a') self.assertTrue(user_a.check_password('password123456')) self.assertTemplateUsed(response, 'audio/index.html') + self.assertEquals(response.request['PATH_INFO'], '/') def test_password_change_view_mismatched_passwords(self): self.client.login(username='user_a', password='password123456') @@ -34,6 +35,7 @@ class PasswordChangeViewTestCase(TestCase): user_a = User.objects.get(username='user_a') self.assertTrue(user_a.check_password('password123456')) self.assertTemplateUsed(response, 'base_form.html') + self.assertEquals(response.request['PATH_INFO'], '/accounts/password-change/') def test_password_change_view_bad_password(self): self.client.login(username='user_a', password='password123456') @@ -46,6 +48,7 @@ class PasswordChangeViewTestCase(TestCase): user_a = User.objects.get(username='user_a') self.assertTrue(user_a.check_password('password123456')) self.assertTemplateUsed(response, 'base_form.html') + self.assertEquals(response.request['PATH_INFO'], '/accounts/password-change/') def test_password_change_view(self): self.client.login(username='user_a', password='password123456') @@ -58,3 +61,4 @@ class PasswordChangeViewTestCase(TestCase): user_a = User.objects.get(username='user_a') self.assertTrue(user_a.check_password('123456password')) self.assertTemplateUsed(response, 'base_form.html') + self.assertEquals(response.request['PATH_INFO'], '/accounts/edit-profile/')