"""Set up unit test environment.""" import pytest @pytest.fixture def track_required_data(): """Return dictionary with a required data for PhfMechadminTrack model.""" return { 'track_id': 'PHF123', 'original_track_id': '123', 'company': 'phonofile', 'length_minute': 1, 'length_seconds': 15, 'public_domain': 'domain' } @pytest.fixture def escrow_data(): """Return dictionary with a required data for PhfPublishingEscrow model.""" return { 'track_id': '1', 'store': 'Amazon', 'qty': 1, 'royalty_rate_calculated': 1, 'royalty_calculated': 1, 'gross_revenue': 1, 'net_revenue': 1, 'dist_fee': 1, 'sales_file_name': 'test_name', 'period_id': 1 } @pytest.fixture def periods_data(): """Return list of dicts, each of them contains period data.""" return [{ 'period_id': 1, 'year': 2000, 'quarter': 1, 'month': 1, 'status': 'open' }, { 'period_id': 2, 'year': 2000, 'quarter': 1, 'month': 2, 'status': 'open' }, { 'period_id': 3, 'year': 2015, 'quarter': 3, 'month': 7, 'status': 'open' }]