This commit is contained in:
parent
f2ab3e0498
commit
3e31c26f5e
2 changed files with 10 additions and 3 deletions
|
|
@ -81,7 +81,10 @@ async def test_update_diary_partial_update(auth_client, diary, user_settings):
|
||||||
body = response.json()
|
body = response.json()
|
||||||
assert body["protein_goal"] == 180.0
|
assert body["protein_goal"] == 180.0
|
||||||
assert body["carb_goal"] == user_settings.carb_goal
|
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):
|
async def test_update_diary_all_goals(auth_client, diary):
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ async def test_create_user_password_too_short_returns_422(client, new_user_paylo
|
||||||
assert response.status_code == 422
|
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:
|
async def _fail(token: str, ip=None) -> None:
|
||||||
raise CaptchaFailed()
|
raise CaptchaFailed()
|
||||||
|
|
||||||
|
|
@ -75,7 +77,9 @@ async def test_change_password_returns_204(auth_client, user_password):
|
||||||
assert response.status_code == 204
|
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"
|
new_password = "newpassword1"
|
||||||
await auth_client.patch(
|
await auth_client.patch(
|
||||||
"/api/user/password",
|
"/api/user/password",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue