"""Global conftest.""" # import json from typing import Any import pytest @pytest.fixture def empty_asset_locations_object_mock() -> Any: return { "execution_name": "test-execution-1", "asset_locations": [], } @pytest.fixture def no_key_asset_locations_object_mock() -> Any: return { "execution_name": "test-execution-1", } @pytest.fixture def asset_locations_dict( empty_asset_locations_object_mock: Any, no_key_asset_locations_object_mock: Any, ) -> dict[str, Any]: return { "empty_asset_locations_object_mock": empty_asset_locations_object_mock, "no_key_asset_locations_object_mock": no_key_asset_locations_object_mock, } @pytest.fixture def asset_locations_object_mock() -> Any: return { "execution_name": "test-execution-1", "asset_locations": [ { "source": "source_bucket/12345.wav", "destination": "123456789/123456789_1_1.wav", }, { "source": "source_bucket/123456.wav", "destination": "123456789/123456789_1_2.wav", }, { "source": "source_bucket/1234567.wav", "destination": "123456789/123456789_1_3.wav", }, { "source": "source_video_bucket/video_master/12345678.mov", "destination": "123456789/123456789_1_4.mov", }, { "source": "source_bucket/images/tif/123456789.tif", "destination": "123456789/123456789.tif", }, { "source": "source_bucket/87654.wav", "destination": "987654321/987654321_1_1.wav", }, { "source": "source_bucket/876543.wav", "destination": "987654321/987654321_1_2.wav", }, { "source": "source_bucket/8765432.wav", "destination": "987654321/987654321_1_3.wav", }, { "source": "source_bucket/87654321.wav", "destination": "987654321/987654321_2_1.wav", }, { "source": "source_bucket/876543210.wav", "destination": "987654321/987654321_2_2.wav", }, { "source": "source_bucket/images/tif/8765432110.tif", "destination": "987654321/987654321.tif", }, ], } @pytest.fixture def asset_locations_mock() -> list[dict[str, str]]: return [ { "source": "source_bucket/12345.wav", "destination": "123456789/123456789_1_1.wav", }, { "source": "source_bucket/123456.wav", "destination": "123456789/123456789_1_2.wav", }, { "source": "source_bucket/1234567.wav", "destination": "123456789/123456789_1_3.wav", }, { "source": "source_video_bucket/video_master/12345678.mov", "destination": "123456789/123456789_1_4.mov", }, { "source": "source_bucket/images/tif/123456789.tif", "destination": "123456789/123456789.tif", }, { "source": "source_bucket/87654.wav", "destination": "987654321/987654321_1_1.wav", }, { "source": "source_bucket/876543.wav", "destination": "987654321/987654321_1_2.wav", }, { "source": "source_bucket/8765432.wav", "destination": "987654321/987654321_1_3.wav", }, { "source": "source_bucket/87654321.wav", "destination": "987654321/987654321_2_1.wav", }, { "source": "source_bucket/876543210.wav", "destination": "987654321/987654321_2_2.wav", }, { "source": "source_bucket/images/tif/8765432110.tif", "destination": "987654321/987654321.tif", }, ] @pytest.fixture def error_report_mock_some_failures() -> list[dict[str, str]]: return [ { "source": "source_bucket/123456.wav", "destination": "123456789/123456789_1_2.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/87654321.wav", "destination": "987654321/987654321_2_1.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/876543210.wav", "destination": "987654321/987654321_2_2.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, ] @pytest.fixture def error_report_mock_total_failures() -> list[dict[str, str]]: return [ { "source": "source_bucket/12345.wav", "destination": "123456789/123456789_1_1.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/123456.wav", "destination": "123456789/123456789_1_2.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/1234567.wav", "destination": "123456789/123456789_1_3.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_video_bucket/video_master/12345678.mov", "destination": "123456789/123456789_1_4.mov", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/images/tif/123456789.tif", "destination": "123456789/123456789.tif", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/87654.wav", "destination": "987654321/987654321_1_1.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/876543.wav", "destination": "987654321/987654321_1_2.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/8765432.wav", "destination": "987654321/987654321_1_3.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/87654321.wav", "destination": "987654321/987654321_2_1.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/876543210.wav", "destination": "987654321/987654321_2_2.wav", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, { "source": "source_bucket/images/tif/8765432110.tif", "destination": "987654321/987654321.tif", "error_reason": "ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access denied", }, ]