| 397 | assert response.status_code == status.HTTP_401_UNAUTHORIZED |
| 398 | |
| 399 | async def test_regular_user( |
| 400 | self, |
| 401 | test_app_client: tuple[httpx.AsyncClient, bool], |
| 402 | user: UserModel, |
| 403 | ): |
| 404 | client, requires_verification = test_app_client |
| 405 | response = await client.get( |
| 406 | "/d35d213e-f3d8-4f08-954a-7e0d1bea286f", |
| 407 | headers={"Authorization": f"Bearer {user.id}"}, |
| 408 | ) |
| 409 | if requires_verification: |
| 410 | assert response.status_code == status.HTTP_403_FORBIDDEN |
| 411 | |
| 412 | async def test_verified_user( |
| 413 | self, |