"""Conftest.""" import json import os import pytest DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data',) @pytest.fixture def mock_event(): """Mock event.""" return { 'key': 'bulk-metadata/test_inputs/BMI TESTING V4 - Fluve Delta V2 R10T16_2023-04-21.json', # noqa: E501 'bucket': 'qa-bulk-metadata-ingester', 'orig_key': 'bulk-metadata/test_inputs/BMI TESTING V4 - Fluve Delta V2 R10T16.csv', # noqa: E501 'items': [ '7892920192100_____991397102999', '7892920192308_____991405286999', '7892920192407_____991412424999', '7892920192506_____991413083999', '7892920192605_____991420367999', '7892920192704_____991428527999', '7892920192803_____991428885999', '7892920192902_____991438952999', '7892920191905_____991386602999', '7892920192001_____991391120999', '7892920192209_____991392734999' ], 'execution_name': 'bulk-metadata-1ba2ecb0-b8bf-45da-8248-b8f11c96ccc9', 'state_machine_name': 'sfn-bulk-metadata-ingester', 'correlation_id': '52fdb332-2aae-4f3e-a7d8-73558c237bad' } @pytest.fixture def mock_json(): """Mock JSON data.""" with open(os.path.join(DATA_DIR, 'test.json')) as fd: return json.loads(fd.read()) @pytest.fixture def mock_csv(): """Mock CSV data.""" with open(os.path.join(DATA_DIR, 'test.csv')) as fd: return fd.read()