mirror of
https://github.com/wowlikon/LibraryAPI.git
synced 2025-12-11 21:30:46 +00:00
Implement tests for all endpoints and update documentation. Added
endpoint for getting the list of all relationships
This commit is contained in:
@@ -33,7 +33,7 @@ def test_get_existing_author(setup_database):
|
||||
response = client.get("/authors/1")
|
||||
print(response.json())
|
||||
assert response.status_code == 200, "Invalid response status"
|
||||
assert response.json() == {"id": 1, "name": "Test Author"}, "Invalid response data"
|
||||
assert response.json() == {"id": 1, "name": "Test Author", "books": []}, "Invalid response data"
|
||||
|
||||
def test_get_not_existing_author(setup_database):
|
||||
response = client.get("/authors/2")
|
||||
|
||||
Reference in New Issue
Block a user