Further tidy-ups, also adds some ytdlp utils to 'utils'

This commit is contained in:
Patrick Robertson
2025-01-20 16:17:57 +01:00
parent befc92deb4
commit fd2e7f973b
6 changed files with 123 additions and 58 deletions

View File

@@ -3,17 +3,17 @@ import pytest
from auto_archiver.core import Metadata
from auto_archiver.core import Step
from auto_archiver.core.metadata import Metadata
from auto_archiver.archivers.archiver import Archiver
class TestArchiverBase(object):
archiver_class = None
config = None
archiver_class: str = None
config: dict = None
@pytest.fixture(autouse=True)
def setup_archiver(self):
assert self.archiver_class is not None, "self.archiver_class must be set on the subclass"
assert self.config is not None, "self.config must be a dict set on the subclass"
self.archiver = self.archiver_class({self.archiver_class.name: self.config})
self.archiver: Archiver = self.archiver_class({self.archiver_class.name: self.config})
def assertValidResponseMetadata(self, test_response: Metadata, title: str, timestamp: str, status: str = ""):
assert test_response is not False