import pytest @pytest.fixture def get_participation_role_categories_response_fixture(): """Fixture to represent role category responses.""" return [{'name': 'Performer', 'roles': [ {'ddexRoleName': 'Accompanyist', 'name': 'Accompanyist'}, ]}, {'name': 'Generic', 'roles': [ { 'ddexRoleName': 'Artist', 'name': 'Artist' } ]}, {'name': 'Studio Personnel', 'roles': [ { 'ddexRoleName': 'AdditionalEngineer', 'name': 'Additional Engineer' }, { 'ddexRoleName': 'AmazingEngineer', 'name': 'Amazing Engineer' }, { 'ddexRoleName': None, 'name': 'Role to be ignored ' } ]}, {'name': 'Record Label Personnel', 'roles': [ { "name": "A & R Administrator", "ddexRoleName": "AAndRAdministrator" }, ]}, ] @pytest.fixture def graphql_error_response_fixture(): """Fixture to represent an error response from a graphql call.""" return { 'errors': [{ 'code': 'example_error', 'message': 'example error' }], 'data': ['some data'] } @pytest.fixture def create_label_participant_response_fixture(): return { "id": "200858473", "name": "Oliver Right" } @pytest.fixture def contributors_fixture(): return [ { 'sequenceNumber': 1, 'participant': { 'name': "An Additional Engineer", 'spotifyUri': None, 'appleId': None, 'members': [] }, 'role': "AdditionalEngineer" }, { 'sequenceNumber': 2, 'participant': { 'name': "An Amazing Engineer", 'spotifyUri': None, 'appleId': None, 'members': [] }, 'role': "AmazingEngineer" }, { 'sequenceNumber': 3, 'participant': { 'name': "Contributor with members", 'spotifyUri': None, 'appleId': None, 'members': [{ 'sequenceNumber': 1, 'participant': { 'name': "An Additional Engineer Member", 'spotifyUri': None, 'appleId': None, 'members': [] }, 'role': "AdditionalEngineer" }, { 'sequenceNumber': 2, 'participant': { 'name': "An Invalid Member", 'spotifyUri': None, 'appleId': None, 'members': [] }, 'role': "InvalidRole" }, { 'sequenceNumber': 3, 'participant': { 'name': "An Amazing Engineer Member", 'spotifyUri': None, 'appleId': None, 'members': [] }, 'role': "AmazingEngineer" }, ] }, 'role': "Something" }, ] @pytest.fixture() def label_participants_fixture(): return [ { 'labelParticipantId': '200858473', 'participationRoleName': 'Additional Engineer' }, { 'labelParticipantId': '200858474', 'participationRoleName': 'Amazing Engineer' } ] @pytest.fixture() def track_fixture(label_participants_fixture): return { 'isrc': 'GBARL7700005', 'studio_personnel': label_participants_fixture }