Fix unit tests

This commit is contained in:
Patrick Robertson
2025-02-20 13:13:01 +00:00
parent eda359a1ef
commit 4174285898
4 changed files with 5 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ def wacz_enricher(setup_module, mock_binary_dependencies):
"socks_proxy_port": None,
"proxy_server": None,
}
wacz = setup_module("wacz_enricher", configs)
wacz = setup_module("wacz_extractor_enricher", configs)
return wacz

View File

@@ -9,7 +9,7 @@ from auto_archiver.core import Metadata, Feeder
def test_setup_without_sheet_and_sheet_id(setup_module, mocker):
# Ensure setup() raises AssertionError if neither sheet nor sheet_id is set.
mocker.patch("gspread.service_account")
with pytest.raises(AssertionError):
with pytest.raises(ValueError):
setup_module(
"gsheet_feeder",
{"service_account": "dummy.json", "sheet": None, "sheet_id": None},

View File

@@ -165,10 +165,10 @@ def test_load_settings_for_module_from_commandline(orchestrator, test_args):
def test_multiple_orchestrator(test_args):
o1_args = test_args + ["--feeders", "gsheet_feeder"]
o1_args = test_args + ["--feeders", "gsheet_feeder", "--gsheet_feeder.service_account", "tests/data/test_service_account.json"]
o1 = ArchivingOrchestrator()
with pytest.raises(AssertionError) as exit_error:
with pytest.raises(ValueError) as exit_error:
# this should fail because the gsheet_feeder requires a sheet_id / sheet
o1.setup(o1_args)