From 1bb0a9d99864c6573bce0e410e6521872f1c77bd Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 15 Jul 2022 11:18:47 -0700 Subject: [PATCH] Updates tests --- bookwyrm/tests/views/preferences/test_change_password.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bookwyrm/tests/views/preferences/test_change_password.py b/bookwyrm/tests/views/preferences/test_change_password.py index fdcf577b0..879ffd03d 100644 --- a/bookwyrm/tests/views/preferences/test_change_password.py +++ b/bookwyrm/tests/views/preferences/test_change_password.py @@ -54,6 +54,7 @@ class ChangePasswordViews(TestCase): with patch("bookwyrm.views.preferences.change_password.login"): result = view(request) validate_html(result.render()) + self.local_user.refresh_from_db() self.assertNotEqual(self.local_user.password, password_hash) def test_password_change_wrong_current(self): @@ -71,6 +72,7 @@ class ChangePasswordViews(TestCase): request.user = self.local_user result = view(request) validate_html(result.render()) + self.local_user.refresh_from_db() self.assertEqual(self.local_user.password, password_hash) def test_password_change_mismatch(self): @@ -88,6 +90,7 @@ class ChangePasswordViews(TestCase): request.user = self.local_user result = view(request) validate_html(result.render()) + self.local_user.refresh_from_db() self.assertEqual(self.local_user.password, password_hash) def test_password_change_invalid(self): @@ -105,4 +108,5 @@ class ChangePasswordViews(TestCase): request.user = self.local_user result = view(request) validate_html(result.render()) + self.local_user.refresh_from_db() self.assertEqual(self.local_user.password, password_hash)