(
client: TestClient,
normal_user_token_headers: dict[str, str],
test_collection: dict[str, Any],
)
| 108 | |
| 109 | |
| 110 | def 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 | |
| 128 | def test_different_user_access( |
nothing calls this directly
no outgoing calls
no test coverage detected