"""Conftest.""" import pytest @pytest.fixture def context(): """Context representing grps ingestion context.""" return { 'status': 'Success', 'context': { 'correlation_id': '59d10831-dc55-44f3-b637-cc31086e5d04', 'grps_ingestion_id': 12345678, 'project': { 'name': 'DDG LP3', 'project_code': '1536914', 'artist': { 'name': 'DDG', 'spotify_uri': 'spotify:artist:0WK3H9OErSn5zKOkOV5egm', 'apple_id': '3954994', } }, 'product': { 'upc': '196871691208', 'product_name': 'She Dont Play', 'grid': 'A10301A0005204073I', 'display_artists': [ { 'name': 'DDG', 'spotify_uri': 'spotify:artist:0WK3H9OErSn5zKOkOV5egm', 'apple_id': '3954994', 'roles': [ 'PRIMARY_ARTIST' ] } ], 'vendor_id': 34519, 'subaccount_id': 61173, 'not_for_distribution': 'SMEAnalyticsDummy', 'parent_repertoire_owner_code': 'C284', 'repertoire_owner_code': 'D670' }, 'tracks': [ { 'isrc': 'USSM12308808', 'track_name': 'Lipgloss', 'sequence_number': 2, 'volume': 1, 'explicit': 'N', 'display_artists': [] }, { 'isrc': 'USSM12308807', 'track_name': 'She Dont Play', 'sequence_number': 1, 'volume': 1, 'explicit': 'Y', 'display_artists': [ { 'name': 'DDG', 'spotify_uri': 'spotify:artist:0WK3H9OzKOkOV5egm', 'apple_id': '3954994', 'roles': [ 'PRIMARY_ARTIST' ] } ] } ], 'deleted_tracks': [5, 6, 7], 'label_participants': [ { 'name': 'DDG', 'artist_id': '2396954', 'label_participant_id': '4c982ee5-ee8d-44817253', 'label_participant_uuid': '4c982ee5-ee8d-4d6217253' } ] } } @pytest.fixture def failed_of_first_step_context(): """Context representing grps ingestion context for failed run.""" return { 'status': 'Failed', 'context': { 'detail': { 'requestParameters': { 'upc': '196874264003', 'grps_ingestion_id': 251 } }, 'errors': { 'Error': 'RepOwnerDoNotIngestException', 'Cause': '{not found}' } } } @pytest.fixture def product_already_exists_context(): """Context grps ingestion context for product already exists run.""" return { 'status': 'Success', 'context': { 'correlation_id': 'b0731346-b544-47bf-8fd1-eb808dd2a75f', 'grps_ingestion_id': 76, 'project': { 'name': 'Terima Kasih..', 'project_code': '1626265', 'project_id': 6875137, }, 'product': { 'upc': '9557119012154', 'product_name': 'Terima Kasih..', 'grid': 'A10301A00057824359', 'release_date': '2026-04-06', 'sale_start_date': '2026-04-06', 'display_artists': [ { 'name': 'Ameng Spring', 'spotify_uri': 'NEW', 'apple_id': '1163693396', 'roles': [ 'PRIMARY_ARTIST' ] } ], 'vendor_id': 34574, 'subaccount_id': 105232, 'not_for_distribution': 'SMEAnalyticsDummy', 'parent_repertoire_owner_code': '0234', 'repertoire_owner_code': 'L184', 'imprint': 'Sony Music Entertainment', 'release_type': 'Full Length', 'catalog_number': 'G0100057824359' }, 'deleted_tracks': [1, 2, 3], 'tracks': [ { 'isrc': 'MYHV10900525', 'track_name': 'Sejujur Mana Kata Kata', 'sequence_number': 8, 'volume': 1, 'explicit': 'N', 'display_artists': [ { 'name': 'Ameng Spring', 'spotify_uri': 'NEW', 'apple_id': '1163693396', 'roles': [ 'PRIMARY_ARTIST' ] } ] } ], 'label_participants': [ { 'name': 'Ameng Spring', 'artist_id': '4917869', 'label_participant_id': '55aed061-5891f-139a6fb16205', 'label_participant_uuid': '55aed061-5891-bf-139a6fb16205', 'role': '' } ], 'errors': { 'Error': 'ProductAlreadyExistsException', 'Cause': '{"errorMessage": "Product already exists with' } } }