Make CWA linking and uploads optional
This commit is contained in:
@@ -14,7 +14,6 @@ from werkzeug.security import generate_password_hash
|
||||
|
||||
from bindery import auth, calibre_db, config, orchestrator
|
||||
from bindery.cwa import CwaClient
|
||||
from bindery.ingest import IngestFolder
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -250,7 +249,7 @@ def test_library_database_failure_keeps_the_http_lookup(library_db, monkeypatch,
|
||||
@pytest.mark.parametrize("saved_id,saved_uuid", [(None, None), (1, "uuid-42"), (42, None)])
|
||||
def test_database_book_id_reaches_the_epub_sidecar(client, library_db, monkeypatch, tmp_path, saved_id, saved_uuid):
|
||||
monkeypatch.setattr(config, "CALIBRE_DB_PATH", library_db)
|
||||
monkeypatch.setattr(orchestrator, "ingest_folder", IngestFolder(tmp_path / "ingest"))
|
||||
monkeypatch.setattr(config, "INGEST_DIR", tmp_path / "ingest")
|
||||
remote = CwaClient("")
|
||||
remote.session.get = Mock(side_effect=AssertionError("No HTTP lookup needed"))
|
||||
monkeypatch.setattr(orchestrator, "cwa", lambda: remote)
|
||||
|
||||
Reference in New Issue
Block a user