From 6266b58650c8a108aaa8f46023359437e6ac0cc1 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 28 Sep 2021 12:02:09 -0700 Subject: [PATCH] Updates static paths in tests --- bookwyrm/tests/views/preferences/test_change_password.py | 2 +- bookwyrm/tests/views/preferences/test_edit_user.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/tests/views/preferences/test_change_password.py b/bookwyrm/tests/views/preferences/test_change_password.py index b72537c4..17afb8f7 100644 --- a/bookwyrm/tests/views/preferences/test_change_password.py +++ b/bookwyrm/tests/views/preferences/test_change_password.py @@ -47,7 +47,7 @@ class ChangePasswordViews(TestCase): password_hash = self.local_user.password request = self.factory.post("", {"password": "hi", "confirm-password": "hi"}) request.user = self.local_user - with patch("bookwyrm.views.password.login"): + with patch("bookwyrm.views.preferences.change_password.login"): view(request) self.assertNotEqual(self.local_user.password, password_hash) diff --git a/bookwyrm/tests/views/preferences/test_edit_user.py b/bookwyrm/tests/views/preferences/test_edit_user.py index 99648bcc..3dccf518 100644 --- a/bookwyrm/tests/views/preferences/test_edit_user.py +++ b/bookwyrm/tests/views/preferences/test_edit_user.py @@ -93,7 +93,7 @@ class EditUserViews(TestCase): form.data["default_post_privacy"] = "public" form.data["preferred_timezone"] = "UTC" image_file = pathlib.Path(__file__).parent.joinpath( - "../../static/images/no_cover.jpg" + "../../../static/images/no_cover.jpg" ) # pylint: disable=consider-using-with form.data["avatar"] = SimpleUploadedFile( @@ -116,7 +116,7 @@ class EditUserViews(TestCase): def test_crop_avatar(self, _): """reduce that image size""" image_file = pathlib.Path(__file__).parent.joinpath( - "../../static/images/no_cover.jpg" + "../../../static/images/no_cover.jpg" ) image = Image.open(image_file)