forked from mirrors/bookwyrm
Updates static paths in tests
This commit is contained in:
parent
c5d7c7dbff
commit
6266b58650
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ class ChangePasswordViews(TestCase):
|
||||||
password_hash = self.local_user.password
|
password_hash = self.local_user.password
|
||||||
request = self.factory.post("", {"password": "hi", "confirm-password": "hi"})
|
request = self.factory.post("", {"password": "hi", "confirm-password": "hi"})
|
||||||
request.user = self.local_user
|
request.user = self.local_user
|
||||||
with patch("bookwyrm.views.password.login"):
|
with patch("bookwyrm.views.preferences.change_password.login"):
|
||||||
view(request)
|
view(request)
|
||||||
self.assertNotEqual(self.local_user.password, password_hash)
|
self.assertNotEqual(self.local_user.password, password_hash)
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ class EditUserViews(TestCase):
|
||||||
form.data["default_post_privacy"] = "public"
|
form.data["default_post_privacy"] = "public"
|
||||||
form.data["preferred_timezone"] = "UTC"
|
form.data["preferred_timezone"] = "UTC"
|
||||||
image_file = pathlib.Path(__file__).parent.joinpath(
|
image_file = pathlib.Path(__file__).parent.joinpath(
|
||||||
"../../static/images/no_cover.jpg"
|
"../../../static/images/no_cover.jpg"
|
||||||
)
|
)
|
||||||
# pylint: disable=consider-using-with
|
# pylint: disable=consider-using-with
|
||||||
form.data["avatar"] = SimpleUploadedFile(
|
form.data["avatar"] = SimpleUploadedFile(
|
||||||
|
@ -116,7 +116,7 @@ class EditUserViews(TestCase):
|
||||||
def test_crop_avatar(self, _):
|
def test_crop_avatar(self, _):
|
||||||
"""reduce that image size"""
|
"""reduce that image size"""
|
||||||
image_file = pathlib.Path(__file__).parent.joinpath(
|
image_file = pathlib.Path(__file__).parent.joinpath(
|
||||||
"../../static/images/no_cover.jpg"
|
"../../../static/images/no_cover.jpg"
|
||||||
)
|
)
|
||||||
image = Image.open(image_file)
|
image = Image.open(image_file)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue