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

Function test_read_nonexistent_card

backend/tests/flashcards/card/test_api.py:110–125  ·  view source on GitHub ↗
(
    client: TestClient,
    normal_user_token_headers: dict[str, str],
    test_collection: dict[str, Any],
)

Source from the content-addressed store, hash-verified

108
109
110def test_read_nonexistent_card(
111 client: TestClient,
112 normal_user_token_headers: dict[str, str],
113 test_collection: dict[str, Any],
114):
115 collection_id = test_collection["id"]
116 non_existent_card_id = str(uuid.uuid4())
117 rsp = client.get(
118 f"{settings.API_V1_STR}/collections/{collection_id}/cards/{non_existent_card_id}",
119 headers=normal_user_token_headers,
120 )
121
122 assert rsp.status_code == 404
123 content = rsp.json()
124 assert "detail" in content
125 assert "not found" in content["detail"]
126
127
128def test_different_user_access(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected