"""Shared fixtures for Meta Daily test modules.""" from unittest.mock import MagicMock import pytest _DATE = '2026-04-17' _DATE_COMPACT = '20260417' @pytest.fixture def activity(): """Return a mock activity worker with a logger.""" return MagicMock() @pytest.fixture def pending_source_sme(): """Return a pending source dict for the SME licensor.""" return { 'licensor': 'sme', 'licensor_feed': 'meta_daily_consumption_sme', 'source_bucket': 'sme-ca-prod-partners', 'source_key': ( f'facebook/in/sme/daily/v1/{_DATE_COMPACT}/' f'sony_consumption_export_{_DATE_COMPACT}.txt' ), 'archive_key': ( f'MetaDaily/archives/{_DATE}/' f'sony_consumption_export_{_DATE_COMPACT}.txt' ), 'file_name': f'sony_consumption_export_{_DATE_COMPACT}.txt', } @pytest.fixture def pending_source_orchard(): """Return a pending source dict for the Orchard licensor.""" return { 'licensor': 'theorchard', 'licensor_feed': 'meta_daily_consumption_theorchard', 'source_bucket': 'sme-ca-prod-partners', 'source_key': ( f'facebook/in/orchard/daily/v1/{_DATE_COMPACT}/' f'orchard_consumption_export_{_DATE_COMPACT}.txt' ), 'archive_key': ( f'MetaDaily/archives/{_DATE}/' f'orchard_consumption_export_{_DATE_COMPACT}.txt' ), 'file_name': f'orchard_consumption_export_{_DATE_COMPACT}.txt', } @pytest.fixture def mock_sf_executor(): """Return a mock Snowflake executor with sf_config.""" executor = MagicMock() executor.sf_config = {'db': 'test_db', 'schema': 'test_schema'} return executor