🐛 fix(crud.py): change HTTP status code from 304 to status.HTTP_304_NOT_MODIFIED for better readability and consistency

✨ feat(crud.py): add support for updating user profile image in the update_user function
✨ feat(test_user.py): add test case for updating user profile image in the test_patch_user function
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-08 14:23:19 -03:00
commit f95a38a4b5
2 changed files with 12 additions and 3 deletions

View file

@ -163,6 +163,14 @@ def test_patch_user(client, active_user, logged_in_headers):
f"/api/v1/users/{user_id}", json=update_data.dict(), headers=logged_in_headers
)
assert response.status_code == 304, response.json()
update_data = UserUpdate(
profile_image="new_image",
)
response = client.patch(
f"/api/v1/users/{user_id}", json=update_data.dict(), headers=logged_in_headers
)
assert response.status_code == 200, response.json()
def test_patch_reset_password(client, active_user, logged_in_headers):