"""Pytest conftest module for set_track_metadata unit tests.""" import pytest @pytest.fixture def label_participants(): """Sample label participants.""" return [ { 'name': 'Artist One', 'artist_id': '1111111', 'label_participant_id': 'uuid-artist-one', 'label_participant_uuid': 'uuid-artist-one', 'role': '', }, { 'name': 'Artist Two', 'artist_id': '2222222', 'label_participant_id': 'uuid-artist-two', 'label_participant_uuid': 'uuid-artist-two', 'role': '', }, ] @pytest.fixture def context_event(label_participants): """State machine input event in Map state format.""" return { 'context': { 'product_type': 'AUDIO', 'correlation_id': 'test-correlation-id', 'project': { 'name': 'Test Project', 'project_code': '123', 'project_id': 1000000, }, 'product': { 'product_id': 9999999, 'upc': '196871691208', 'product_name': 'Test Album', }, 'label_participants': label_participants, }, 'track': { 'isrc': 'QZCDB2000001', 'track_name': 'Test Track', 'tuid': 12345678, 'sequence_number': 1, 'volume': 1, 'explicit': 'Y', 'version': 'Deluxe', 'display_artists': [ { 'name': 'Artist One', 'roles': ['PRIMARY_ARTIST'], }, { 'name': 'Artist Two', 'roles': ['FEATURED_ARTIST'], }, ], }, } @pytest.fixture def save_tracks_response(): """Response from saveTracks mutation.""" return { 'data': { 'saveTracks': { 'productId': 9999999, } } }