| 85 | assert data["email"] == user.email |
| 86 | |
| 87 | async def test_verified_user( |
| 88 | self, |
| 89 | test_app_client: tuple[httpx.AsyncClient, bool], |
| 90 | verified_user: UserModel, |
| 91 | ): |
| 92 | client, _ = test_app_client |
| 93 | response = await client.get( |
| 94 | "/me", headers={"Authorization": f"Bearer {verified_user.id}"} |
| 95 | ) |
| 96 | assert response.status_code == status.HTTP_200_OK |
| 97 | data = cast(dict[str, Any], response.json()) |
| 98 | assert data["id"] == str(verified_user.id) |
| 99 | assert data["email"] == verified_user.email |
| 100 | |
| 101 | async def test_current_user_namespace(self, app_factory): |
| 102 | assert app_factory(True).url_path_for("users:current_user") == "/me" |