"""Conftest.""" import pytest @pytest.fixture def context(): """Context representing DDEX data.""" return { 'status': 'Success', 'ingest_id': 123, 'context': { 'ddex_provider': 'BULK', 'execution_name': 'execution_name', 'state_machine_name': 'state_machine_name', 'execution_start_time': '2019-03-26T20:14:13.192Z', 'update_indicator': 'OriginalMessage', 'message_id': '12345', 'message_thread_id': '12345-TEST', 'bucket': 'bucket_name', 'key': 'generated_json/key_name_2023-05-09T10-15-16.json', 'orig_key': 'bulk-metadata/test_inputs/key_name.csv', 'product': { 'status': None, 'display_artist_name': 'Cool Artist', 'vendor_id': 123, 'subaccount_id': 0, }, 'errors': { 'Error': 'ProjectCodeMismatchException', 'Cause': '{\"errorMessage\": \"GraphQL project code \\\"DUB017\\\" does not match DDEX project code \\\"EXP187642\\\"\", \"errorType\": \"ProjectCodeMismatchException\", \"stackTrace\": [\" File \\\"/var/lang/lib/python3.8/site-packages/sentry_sdk/integrations/aws_lambda.py\\\", line 161, in sentry_handler\\n reraise(*exc_info)\\n\", \" File \\\"/var/lang/lib/python3.8/site-packages/sentry_sdk/_compat.py\\\", line 54, in reraise\\n raise value\\n\", \" File \\\"/var/lang/lib/python3.8/site-packages/sentry_sdk/integrations/aws_lambda.py\\\", line 152, in sentry_handler\\n return handler(aws_event, aws_context, *args, **kwargs)\\n\", \" File \\\"/var/task/index.py\\\", line 52, in handler\\n check_project_code_mismatch(\\n\", \" File \\\"/var/task/index.py\\\", line 95, in check_project_code_mismatch\\n raise ProjectCodeMismatchException(message)\\n\"]}' # noqa }, } }