"""Pytest conftest module.""" import pytest @pytest.fixture() def context_data(): """Context object representing DDEX data.""" return { 'project': { 'project_code': 'EXP554492', }, 'product': { 'release_reference': 'R0', 'upc': '111115264505', 'vendor_id': 3453, 'subaccount_id': 0, 'is_main_release': True, 'artwork': { 'filename': 'artwork.tif', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/artwork.tif' }, 'release_type': 'VideoSingle', 'sale_start_date': '2020-10-21', 'original_release_date': '2004-01-08', 'grid': 'A10301A0000025264A', 'catalog_number': 'G010000025264A', 'display_artist_name': 'Kelly Clarkson', 'product_id': 3382207, 'product_name': 'Before Your Love', 'product_version': 'VIDEO', 'special_instructions': 'Something', 'genre_id': 1, 'subgenre_id': 2, 'genres': [ { 'genre': 'Pop', 'subgenre': 'Alternative', } ], 'p_line': '(C) 2002 19 Recordings Limited', 'display_artists': [ { 'name': 'Kelly Clarkson', 'sequence_number': 1, 'roles': [ 'MainArtist' ] }, { 'name': 'Artist', 'sequence_number': 2, 'roles': [ 'SecondaryArtist' ] }, ], 'not_for_distribution': 'SwitchboardDummy' }, 'tracks': None, 'video': { 'release_reference': 'R1', 'assets': [ { 'filename': 'video1.mp4', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/video1.mp4' }, { 'filename': 'video2.mp4', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/video2.mp4' }, ], 'tuid': 45678, 'associated_track_tuid': 45677, 'isrc': 'USSM12001699', 'product_code': 'G010000025264A', 'release_type': 'VideoTrackRelease', 'workflow_id': 1234, 'video_name': 'Before Your Love', 'video_version': 'VIDEO', 'video_type': 'Official Music Video', 'explicit': 'E', 'p_line': {'line': 'SG Productions', 'year': 2018}, 'c_line': {'line': 'SG Productions', 'year': 2018}, 'title_language': 'ENG', 'content_language': 'ENG', 'product_code': 'G010000025264A', 'imprint': '19 Recordings', 'associated_track_isrc': 'TRAIM1800040', 'description': 'Some video description', 'parental_advisory': 'No', 'lyrics': 'Some lyrics', 'keywords': ['keyword1', 'keyword2'], 'genres': [{ 'genre': 'ELECTRONICA-00', 'subgenre': 'POP-00' }], 'display_artists': [ { 'name': 'Kelly Clarkson', 'sequence_number': 1, 'roles': ['Featuring', 'Invalid'] }, { 'name': 'Artist', 'sequence_number': 2, 'roles': ['Director', 'Videographer'] }, ], 'resource_contributors': [{ 'name': 'John', 'sequence_number': 1, 'roles': ['FilmEditor'] }], }, 'participants': [ { 'name': 'Kelly Clarkson', 'artist_id': '1', 'label_participant_id': '1L', 'label_participant_uuid': '1U', }, { 'name': 'Artist', 'artist_id': '2', 'label_participant_id': '2L', 'label_participant_uuid': '2U', }, { 'name': 'John', 'artist_id': '3', 'label_participant_id': '3L', 'label_participant_uuid': '3U', } ], 'ddex_provider': 'SME', 'deals': None, 'key': 'folder/subfolder/', 'bucket': 'ddex-bucket', 'execution_name': None, 'asset': { 'filename': 'video1.mp4', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/video1.mp4' }, 'message_id': '234524523', 'message_thread_id': 'G014523452345', 'update_indicator': 'OriginalMessage', 'party_id': 'PADPIDA2007040502I', 'state_machine_name': 'state_machine_name', 'execution_start_time': '2019-03-26T20:14:13.192Z', } @pytest.fixture() def s3_context(): """Context object representing DDEX data.""" return { 'product': { 'release_reference': 'R0', 'upc': '111115264505', 'vendor_id': 3453, 'subaccount_id': 0, 'is_main_release': True, 'artwork': { 'filename': 'artwork.tif', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/artwork.tif' }, 'release_type': 'VideoSingle', 'sale_start_date': '2020-10-21', 'original_release_date': '2004-01-08', 'grid': 'A10301A0000025264A', 'catalog_number': 'G010000025264A', 'display_artist_name': 'Kelly Clarkson', 'product_id': 3382207, 'product_name': 'Before Your Love', 'product_version': 'VIDEO', 'special_instructions': 'Something', 'genre_id': 1, 'subgenre_id': 2, 'genres': [ { 'genre': 'Pop', 'subgenre': 'Alternative', } ], 'p_line': '(C) 2002 19 Recordings Limited', 'display_artists': [ { 'name': 'Kelly Clarkson', 'sequence_number': 1, 'roles': [ 'MainArtist' ] }, { 'name': 'Artist', 'sequence_number': 2, 'roles': [ 'SecondaryArtist' ] }, ], 'not_for_distribution': 'SwitchboardDummy' }, 'tracks': None, 'video': { 'release_reference': 'R1', 'assets': [ { 'filename': 'video1.mp4', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/video1.mp4' }, { 'filename': 'video2.mp4', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/video2.mp4' }, ], 'tuid': 45678, 'associated_track_tuid': 45677, 'isrc': 'USSM12001699', 'product_code': 'G010000025264A', 'release_type': 'VideoTrackRelease', 'workflow_id': 1234, 'video_name': 'Before Your Love', 'video_version': 'VIDEO', 'video_type': 'Official Music Video', 'explicit': 'E', 'p_line': {'line': 'SG Productions', 'year': 2018}, 'c_line': {'line': 'SG Productions', 'year': 2018}, 'title_language': 'ENG', 'content_language': 'ENG', 'product_code': 'G010000025264A', 'imprint': '19 Recordings', 'associated_track_isrc': 'TRAIM1800040', 'description': 'Some video description', 'parental_advisory': 'No', 'lyrics': 'Some lyrics', 'keywords': ['keyword1', 'keyword2'], 'genres': [{ 'genre': 'ELECTRONICA-00', 'subgenre': 'POP-00' }], 'display_artists': [ { 'name': 'Kelly Clarkson', 'sequence_number': 1, 'roles': ['Featuring', 'Invalid'] }, { 'name': 'Artist', 'sequence_number': 2, 'roles': ['Director', 'Videographer'] }, ], 'resource_contributors': [{ 'name': 'John', 'sequence_number': 1, 'roles': ['FilmEditor'] }], }, 'label_participants': [ { 'name': 'Kelly Clarkson', 'artist_id': '1', 'label_participant_id': '1L', 'label_participant_uuid': '1U', }, { 'name': 'Artist', 'artist_id': '2', 'label_participant_id': '2L', 'label_participant_uuid': '2U', }, { 'name': 'John', 'artist_id': '3', 'label_participant_id': '3L', 'label_participant_uuid': '3U', } ], 'deals': None, 'key': 'folder/subfolder/', 'bucket': 'ddex-bucket', 'execution_name': None, 'asset': { 'filename': 'video1.mp4', 'filepath': 'resources/', 'bucket': 'ddex-bucket', 'key': 'folder/subfolder/resources/video1.mp4' }, 'message_id': '234524523', 'message_thread_id': 'G014523452345', 'update_indicator': 'OriginalMessage', 'party_id': 'PADPIDA2007040502I', 'state_machine_name': 'state_machine_name', 'execution_start_time': '2019-03-26T20:14:13.192Z', } @pytest.fixture def available_channels_by_product_id(): """Graphql reponse data.""" return { 'data': { 'getAvailableVideoChannelsByProductId': [ { 'channelName': 'orchardmusic', 'channelId': 'ACCu6XdOryMB1I0VLK9M5kHw' }, { 'channelName': None, 'channelId': 'BCCu6XdOryMB1I0VLK9M5kHw' }, { 'channelName': None, 'channelId': 'UCCu6XdOryMB1I0VLK9M5kHw' }, { 'channelName': 'TestVEVO', 'channelId': 'CCCu6XdOryMB1I0VLK9M5kHw' } ] } } @pytest.fixture def save_video_single_product(): """Graphql reponse data.""" return { 'data': { 'saveVideoSingleProduct': { 'productId': 3296944 } } } @pytest.fixture def s3_release_corrections(): """S3 Release Correction JSON file.""" return { 'changes': [] }