Tidy ups + unit tests:

1. Allow loading modules from --module_paths=/extra/path/here
2. Improved unit tests for module loading
3. Further small tidy ups/clean ups
This commit is contained in:
Patrick Robertson
2025-01-29 18:42:12 +01:00
parent dcd5576f29
commit 3d37c494aa
13 changed files with 216 additions and 81 deletions

View File

@@ -2,7 +2,7 @@ import pytest
from auto_archiver.core.metadata import Metadata
from auto_archiver.core.extractor import Extractor
from auto_archiver.core.module import get_module
class TestExtractorBase(object):
extractor_module: str = None
@@ -12,6 +12,7 @@ class TestExtractorBase(object):
def setup_archiver(self, setup_module):
assert self.extractor_module is not None, "self.extractor_module must be set on the subclass"
assert self.config is not None, "self.config must be a dict set on the subclass"
self.extractor: Extractor = setup_module(self.extractor_module, self.config)
def assertValidResponseMetadata(self, test_response: Metadata, title: str, timestamp: str, status: str = ""):