Fix bug ordering tsr that only have one cert + more unit tests

This commit is contained in:
Patrick Robertson
2025-03-11 15:44:04 +00:00
parent 2ffe124d95
commit 294033f156
11 changed files with 158 additions and 173 deletions

View File

@@ -9,7 +9,7 @@ from typing import Dict, Tuple
import hashlib
import pytest
from auto_archiver.core.metadata import Metadata
from auto_archiver.core.metadata import Metadata, Media
from auto_archiver.core.module import ModuleFactory
# Test names inserted into this list will be run last. This is useful for expensive/costly tests
@@ -139,6 +139,12 @@ def mock_binary_dependencies(mocker):
mock_shutil_which.return_value = "/usr/bin/fake_binary"
return mock_shutil_which
@pytest.fixture
def sample_media(tmp_path) -> Media:
"""Fixture creating a Media object with temporary source file"""
src_file = tmp_path / "source.txt"
src_file.write_text("test content")
return Media(key="subdir/test.txt", filename=str(src_file))
@pytest.fixture
def sample_datetime():