Wait only 5 seconds for CWA on the story page
A job still waits for the full timeout.
This commit is contained in:
@@ -99,6 +99,7 @@ def test_library_search_link_import_and_unlink(client, story, monkeypatch):
|
||||
assert client.get("/api/library/search?q=Title").json[0]["tracked_as"] == "Story"
|
||||
cwa.get_book.side_effect = CwaError("offline")
|
||||
assert client.get(f"/api/stories/{sid}").json["library_error"] == "offline"
|
||||
cwa.get_book.assert_called_with("book-7", timeout=5) # the page does not wait long for CWA
|
||||
cwa.get_book.side_effect = None
|
||||
cwa.get_book.return_value = None
|
||||
assert client.post(f"/api/stories/{sid}/link", json={"uuid": "missing"}, headers=H).status_code == 404
|
||||
|
||||
Reference in New Issue
Block a user