(self, async_client: AsyncClient)
| 66 | |
| 67 | class UserTester: |
| 68 | async def create_user(self, async_client: AsyncClient) -> Users: |
| 69 | response = await async_client.post("/users", json={"username": "admin"}) |
| 70 | assert response.status_code == 200, response.text |
| 71 | data = response.json() |
| 72 | assert data["username"] == "admin" |
| 73 | assert "id" in data |
| 74 | user_id = data["id"] |
| 75 | |
| 76 | user_obj = await Users.get(id=user_id) |
| 77 | assert user_obj.id == user_id |
| 78 | return user_obj |
| 79 | |
| 80 | async def user_list(self, async_client: AsyncClient) -> tuple[datetime, Users, User_Pydantic]: |
| 81 | utc_now = datetime.now(UTC) |
no test coverage detected