mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 13:18:28 +03:00
Fix unit tests
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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},
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user