diff --git a/fooder/test/view/test_diary.py b/fooder/test/view/test_diary.py index a308c2a..f00df22 100644 --- a/fooder/test/view/test_diary.py +++ b/fooder/test/view/test_diary.py @@ -81,7 +81,10 @@ async def test_update_diary_partial_update(auth_client, diary, user_settings): body = response.json() assert body["protein_goal"] == 180.0 assert body["carb_goal"] == user_settings.carb_goal - assert body["calories_goal"] == user_settings.calories_goal + assert body["fat_goal"] == user_settings.fat_goal + assert ( + body["calories_goal"] != user_settings.calories_goal + ) # recalculated since None async def test_update_diary_all_goals(auth_client, diary): diff --git a/fooder/test/view/test_user.py b/fooder/test/view/test_user.py index 7c4f084..17b1729 100644 --- a/fooder/test/view/test_user.py +++ b/fooder/test/view/test_user.py @@ -58,7 +58,9 @@ async def test_create_user_password_too_short_returns_422(client, new_user_paylo assert response.status_code == 422 -async def test_create_user_captcha_failure_returns_403(client, monkeypatch, new_user_payload): +async def test_create_user_captcha_failure_returns_403( + client, monkeypatch, new_user_payload +): async def _fail(token: str, ip=None) -> None: raise CaptchaFailed() @@ -75,7 +77,9 @@ async def test_change_password_returns_204(auth_client, user_password): assert response.status_code == 204 -async def test_change_password_can_login_with_new_password(auth_client, user, user_password): +async def test_change_password_can_login_with_new_password( + auth_client, user, user_password +): new_password = "newpassword1" await auth_client.patch( "/api/user/password",