"""Pytest configuration.""" from unittest.mock import patch import pytest @pytest.fixture def mock_vendor_mapping(): """Mock vendor mapping for tests.""" return { 'AE/DELPHI': { 'platforms': ['smf', 'wordpress'], 'to_addresses': ['tbd@gmail.com'] }, 'Wyng': { 'platforms': ['wyng'], 'to_addresses': ['tbd@gmail.com'] }, 'MTL': { 'platforms': ['mtl'], 'to_addresses': ['tbd@gmail.com'] }, 'TuneSpeak': { 'platforms': ['tunespeak'], 'to_addresses': ['tbd@gmail.com'] } } @pytest.fixture(autouse=True) def mock_constants(mock_vendor_mapping): """Mock constants module for all tests automatically.""" with patch('src.app.constants') as mock: mock.VENDOR_DELETION_PLATFORMS = ['smf', 'wyng', 'tunespeak', 'mtl', 'wordpress'] mock.SENDER_DISPLAY_NAME = 'Sony Music Fan Delete Request' mock.VENDOR_MAPPING = mock_vendor_mapping yield mock @pytest.fixture(autouse=True) def mock_config(): """Mock config module for all tests automatically.""" with patch('src.app.config') as mock: mock.SENDER_EMAIL = 'donotreply@sonymusic.com' mock.CC_ADDRESSES = [] yield mock @pytest.fixture def mock_snowflake_data(): """Mock Snowflake deletion request data.""" return [ { 'REQUEST_ID': 'req-001', 'EMAIL': 'user1@example.com', 'PLATFORMS': ['smf', 'wordpress'] }, { 'REQUEST_ID': 'req-002', 'EMAIL': 'user2@example.com', 'PLATFORMS': ['wyng'] }, { 'REQUEST_ID': 'req-003', 'EMAIL': 'user3@example.com', 'PLATFORMS': ['tunespeak', 'mtl'] } ]