mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-08 03:18:28 +03:00
Fix unit tests
This commit is contained in:
@@ -28,7 +28,7 @@ def setup_module(request):
|
||||
|
||||
# add the tmp_dir to the module
|
||||
tmp_dir = TemporaryDirectory()
|
||||
m.tmp_dir = tmp_dir
|
||||
m.tmp_dir = tmp_dir.name
|
||||
|
||||
def cleanup():
|
||||
_LAZY_LOADED_MODULES.pop(module_name)
|
||||
|
||||
@@ -66,7 +66,7 @@ def test_load_module(example_module):
|
||||
# check that the vlaue is set on the module itself
|
||||
assert loaded_module.csv_file == "db.csv"
|
||||
|
||||
@pytest.mark.parametrize("module_name", ["cli_feeder", "local_storage", "generic_extractor", "html_formatter", "csv_db"])
|
||||
@pytest.mark.parametrize("module_name", ["local_storage", "generic_extractor", "html_formatter", "csv_db"])
|
||||
def test_load_modules(module_name):
|
||||
# test that specific modules can be loaded
|
||||
module = get_module_lazy(module_name)
|
||||
@@ -84,7 +84,7 @@ def test_load_modules(module_name):
|
||||
assert loaded_module.name in loaded_module.config.keys()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("module_name", ["cli_feeder", "local_storage", "generic_extractor", "html_formatter", "csv_db"])
|
||||
@pytest.mark.parametrize("module_name", ["local_storage", "generic_extractor", "html_formatter", "csv_db"])
|
||||
def test_lazy_base_module(module_name):
|
||||
lazy_module = get_module_lazy(module_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user