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

Function get_superuser_token_headers

backend/tests/utils/utils.py:17–26  ·  view source on GitHub ↗
(client: TestClient)

Source from the content-addressed store, hash-verified

15
16
17def get_superuser_token_headers(client: TestClient) -> dict[str, str]:
18 login_data = {
19 "username": settings.FIRST_SUPERUSER,
20 "password": settings.FIRST_SUPERUSER_PASSWORD,
21 }
22 r = client.post(f"{settings.API_V1_STR}/tokens", data=login_data)
23 tokens = r.json()
24 a_token = tokens["access_token"]
25 headers = {"Authorization": f"Bearer {a_token}"}
26 return headers

Callers 1

superuser_token_headersFunction · 0.90

Calls

no outgoing calls

Tested by 1

superuser_token_headersFunction · 0.72