"""Fixture for track localizations.""" import pytest TUID = 2 def track_localization_ows_product_response(): """Fixture for track localization ows_product response.""" return { 'items': [ { 'tuid': TUID, 'language_id': 2, 'track_name': 'Gangsta\'s Paradise', 'version': 'Explicit', 'artists': {'4': 'Coolio'} }, { 'tuid': TUID, 'language_id': 3, 'track_name': 'Gangsta\'s Paradise', 'version': 'Explicit', 'artists': {'4': 'Coolio'} } ], 'pagination': { 'type': 'none', 'total_records': 2 } } def track_localization_ows_product_response_put_track(): """Fixture for track localization ows_product response.""" data = track_localization_ows_product_response().copy() for item in data['items']: item['tuid'] = 1 item['artists'] = {'3': 'Coolio'} return data def track_localizations_with_artist_types(): """Fixture for track localizations with artist types.""" return [ { 'tuid': TUID, 'language_id': 2, 'track_name': 'Gangsta\'s Paradise', 'version': 'Explicit', 'artists': [{ 'name': 'Coolio', 'track_artist_id': 4, 'type': 'performer' }] }, { 'tuid': TUID, 'language_id': 3, 'track_name': 'Gangsta\'s Paradise', 'version': 'Explicit', 'artists': [{ 'name': 'Coolio', 'track_artist_id': 4, 'type': 'performer' }] } ] @pytest.fixture def track_localizations_with_artist_types_put_track(track_localizations_with_artist_types): """Fixture for track localizations with artist types.""" data = track_localizations_with_artist_types.copy() for item in data: item['tuid'] = 1 item['artists'] = [{ 'name': 'Coolio', 'track_artist_id': 3, 'type': 'performer' }] return data LONG_LOCALIZED_TRACK_NAME = ( 'A very very long localized name, that consists of multiple words' ' and the length of this localized name is more than 200 characters. ' 'With our 80-symbols length strings it is hard to create such a long' 'localized track name. Possibly it is time to increase the max line' ' length to 120 characters?')