MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / test_get_access_token

Function test_get_access_token

backend/tests/auth/test_api.py:7–16  ·  view source on GitHub ↗
(client: TestClient, db: Session)

Source from the content-addressed store, hash-verified

5
6
7def test_get_access_token(client: TestClient, db: Session) -> None: # noqa: ARG001
8 login_data = {
9 "username": settings.FIRST_SUPERUSER,
10 "password": settings.FIRST_SUPERUSER_PASSWORD,
11 }
12 r = client.post(f"{settings.API_V1_STR}/tokens", data=login_data)
13 tokens = r.json()
14 assert r.status_code == 200
15 assert "access_token" in tokens
16 assert tokens["access_token"]
17
18
19def test_get_access_token_incorrect_password(client: TestClient) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected