| 468 | assert "hashed_password" not in data |
| 469 | |
| 470 | async def test_verified_superuser( |
| 471 | self, |
| 472 | test_app_client: tuple[httpx.AsyncClient, bool], |
| 473 | user: UserModel, |
| 474 | verified_superuser: UserModel, |
| 475 | ): |
| 476 | client, _ = test_app_client |
| 477 | response = await client.get( |
| 478 | f"/{user.id}", headers={"Authorization": f"Bearer {verified_superuser.id}"} |
| 479 | ) |
| 480 | assert response.status_code == status.HTTP_200_OK |
| 481 | |
| 482 | data = cast(dict[str, Any], response.json()) |
| 483 | assert data["id"] == str(user.id) |
| 484 | assert "hashed_password" not in data |
| 485 | |
| 486 | async def test_get_user_namespace(self, app_factory, user: UserModel): |
| 487 | assert app_factory(True).url_path_for("users:user", id=user.id) == f"/{user.id}" |