diff --git a/tests/test_router_auth.py b/tests/test_router_auth.py index 139d40e4..a689538b 100644 --- a/tests/test_router_auth.py +++ b/tests/test_router_auth.py @@ -66,7 +66,7 @@ class TestLogin: ): client, _ = test_app_client response = await client.post(path, data={}) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.on_after_login.called is False async def test_missing_username( @@ -78,7 +78,7 @@ class TestLogin: client, _ = test_app_client data = {"password": "guinevere"} response = await client.post(path, data=data) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.on_after_login.called is False async def test_missing_password( @@ -90,7 +90,7 @@ class TestLogin: client, _ = test_app_client data = {"username": "king.arthur@camelot.bt"} response = await client.post(path, data=data) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.on_after_login.called is False async def test_not_existing_user( diff --git a/tests/test_router_register.py b/tests/test_router_register.py index b6bb1c4b..db9a72c1 100644 --- a/tests/test_router_register.py +++ b/tests/test_router_register.py @@ -32,22 +32,22 @@ async def test_app_client( class TestRegister: async def test_empty_body(self, test_app_client: httpx.AsyncClient): response = await test_app_client.post("/register", json={}) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT async def test_missing_email(self, test_app_client: httpx.AsyncClient): json = {"password": "guinevere"} response = await test_app_client.post("/register", json=json) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT async def test_missing_password(self, test_app_client: httpx.AsyncClient): json = {"email": "king.arthur@camelot.bt"} response = await test_app_client.post("/register", json=json) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT async def test_wrong_email(self, test_app_client: httpx.AsyncClient): json = {"email": "king.arthur", "password": "guinevere"} response = await test_app_client.post("/register", json=json) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT async def test_invalid_password(self, test_app_client: httpx.AsyncClient): json = {"email": "king.arthur@camelot.bt", "password": "g"} diff --git a/tests/test_router_reset.py b/tests/test_router_reset.py index 851ba1cb..ec144e1f 100644 --- a/tests/test_router_reset.py +++ b/tests/test_router_reset.py @@ -36,7 +36,7 @@ class TestForgotPassword: self, test_app_client: httpx.AsyncClient, user_manager: UserManagerMock ): response = await test_app_client.post("/forgot-password", json={}) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.forgot_password.called is False async def test_not_existing_user( @@ -77,7 +77,7 @@ class TestResetPassword: user_manager: UserManagerMock, ): response = await test_app_client.post("/reset-password", json={}) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.reset_password.called is False async def test_missing_token( @@ -85,7 +85,7 @@ class TestResetPassword: ): json = {"password": "guinevere"} response = await test_app_client.post("/reset-password", json=json) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.reset_password.called is False async def test_missing_password( @@ -95,7 +95,7 @@ class TestResetPassword: ): json = {"token": "foo"} response = await test_app_client.post("/reset-password", json=json) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.reset_password.called is False async def test_invalid_token( diff --git a/tests/test_router_verify.py b/tests/test_router_verify.py index ef8b8034..ce867e9f 100644 --- a/tests/test_router_verify.py +++ b/tests/test_router_verify.py @@ -39,7 +39,7 @@ class TestVerifyTokenRequest: user_manager: UserManagerMock, ): response = await test_app_client.post("/request-verify-token", json={}) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.request_verify.called is False async def test_wrong_email( @@ -49,7 +49,7 @@ class TestVerifyTokenRequest: ): json = {"email": "king.arthur"} response = await test_app_client.post("/request-verify-token", json=json) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.request_verify.called is False async def test_user_not_exists( @@ -125,7 +125,7 @@ class TestVerify: user_manager: UserManagerMock, ): response = await test_app_client.post("/verify", json={}) - assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY + assert response.status_code == status.HTTP_422_UNPROCESSABLE_CONTENT assert user_manager.verify.called is False async def test_invalid_verify_token(