Give a library book one form in the API
A book from the search, from the list of library candidates and from a lookup now has the same fields, with the authors as a list.
This commit is contained in:
@@ -91,7 +91,7 @@ def test_library_search_link_import_and_unlink(client, story, monkeypatch):
|
||||
cwa.get_book.return_value = book.to_dict()
|
||||
monkeypatch.setattr(o, "cwa", lambda: cwa)
|
||||
monkeypatch.setattr(config, "CWA_URL", "https://cwa.example")
|
||||
assert client.get("/api/library/candidates").json[0]["calibre_id"] == 7
|
||||
assert client.get("/api/library/candidates").json[0]["id"] == 7
|
||||
assert client.get("/api/library/search?q=Title").json[0]["tracked_as"] is None
|
||||
cwa.search.assert_called_once_with("Title")
|
||||
linked = client.post(f"/api/stories/{sid}/link", json={"uuid": "book-7"}, headers=H)
|
||||
|
||||
Reference in New Issue
Block a user