MCPcopy Index your code
hub / github.com/fastapi-users/fastapi-users / test_regular_user

Method test_regular_user

tests/test_router_users.py:399–410  ·  view source on GitHub ↗
(
        self,
        test_app_client: tuple[httpx.AsyncClient, bool],
        user: UserModel,
    )

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected