"""Pytest conftest module.""" import pytest @pytest.fixture def context_json_audio(): """Context object representing Bulk Asset data.""" return """ { "product": { "product_id": 12345, "upc": "1234567890987", "vendor_id": 1234, "subaccount_id": 123456, "release_name": "Evergreen", "project_code": "12345678909", "project_name": "Project Name", "project_id": 1234567, "track": { "bucket": "test_bucket", "key": "test_path/test_filename.wav", "filename": "test_filename.wav", "ows_assets_filename": "uuid.wav", "isrc": "TEST123456789", "tuid": "12345678", "track_sequence_number": 1, "track_volume_number": 1, "track_name": "Test Track Name" } }, "asset_type": "audio", "execution_name": "test_execution_name", "state_machine_name": "sfn_name", "correlation_id": "test_correlation_id" }""" # Good Files ----------------------------------------------------------------- @pytest.fixture def pcm_16_48_st(): """Represent a WAV, 16-bits, 48Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'PCM_16', 'samplerate': 48000, 'channels': 2 } @pytest.fixture def pcm_24_96_st(): """Represent a PCM-WAV, 24-bits, 96Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'PCM_24', 'samplerate': 96000, 'channels': 2 } @pytest.fixture def flac_16_48_st(): """Represent a FLAC, 16-bits, 48Khz, Stereo file.""" return { 'format': 'FLAC', 'subtype': 'PCM_16', 'samplerate': 48000, 'channels': 2 } @pytest.fixture def pcm_32_1764_st(): """Represent a FLAC, 32-bits, 176.4Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'PCM_32', 'samplerate': 176400, 'channels': 2 } # Bad Files ------------------------------------------------------------------ @pytest.fixture def wavex_24_96_st(): """Represent a WAVEX, 24-bits, 96Khz, Stereo file.""" return { 'format': 'WAVEX', 'subtype': 'PCM_24', 'samplerate': 96000, 'channels': 2 } @pytest.fixture def aiff_24_96_st(): """Represent a AIFF, 24-bits, 96Khz, Stereo file.""" return { 'format': 'AIFF', 'subtype': 'PCM_24', 'samplerate': 96000, 'channels': 2 } @pytest.fixture def pcm_16_12_st(): """Represent a WAVEX, 16-bits, 12Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'PCM_16', 'samplerate': 12000, 'channels': 2 } @pytest.fixture def pcm_16_48_mo(): """Represent a WAV, 16-bits, 48Khz, Monaural(mono) file.""" return { 'format': 'WAV', 'subtype': 'PCM_16', 'samplerate': 48000, 'channels': 1 } @pytest.fixture def pcm_16_96_st(): """Represent a WAV, 16-bits, 96Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'PCM_16', 'samplerate': 96000, 'channels': 2 } @pytest.fixture def pcm_24_12_st(): """Represent a WAV, 24-bits, 12Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'PCM_24', 'samplerate': 12000, 'channels': 2 } @pytest.fixture def pcm_float_96_st(): """Represent a Float, 32-bits, 176.4Khz, Stereo file.""" return { 'format': 'WAV', 'subtype': 'FLOAT', 'samplerate': 96000, 'channels': 2 }