"""Conftest.""" import pytest @pytest.fixture def cloudwatch_event(): """Response from track query.""" return { 'version': '0', 'id': 'f4764c5e-e087-26a0-f880-861ed49de74d', 'detail-type': 'AWS API Call via CloudTrail', 'source': 'aws.s3', 'account': '437795906767', 'time': '2023-04-07T11:22:43Z', 'region': 'us-east-1', 'resources': [], 'detail': { 'eventVersion': '1.08', 'userIdentity': { 'type': 'IAMUser', 'principalId': 'AIDAWL3VLMTH7RAOKSAAP', 'arn': 'arn:aws:iam::437795906767:user/gquintino', 'accountId': '437795906767', 'accessKeyId': 'ASIAWL3VLMTHY6YD3CXI', 'userName': 'gquintino', 'sessionContext': { 'attributes': { 'creationDate': '2023-04-07T10:24:37Z', 'mfaAuthenticated': 'true' } } }, 'eventTime': '2023-04-07T11:22:43Z', 'eventSource': 's3.amazonaws.com', 'eventName': 'PutObject', 'awsRegion': 'us-east-1', 'sourceIPAddress': '94.63.242.92', 'userAgent': '[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36]', # noqa: E501 'requestParameters': { 'X-Amz-Date': '20230407T112231Z', 'bucketName': 'qa-bulk-metadata-ingester', 'X-Amz-Algorithm': 'AWS4-HMAC-SHA256', 'x-amz-acl': 'private', 'X-Amz-SignedHeaders': 'content-md5;content-type;host;x-amz-acl;x-amz-storage-class', # noqa: E501 'Host': 'qa-bulk-metadata-ingester.s3.us-east-1.amazonaws.com', 'X-Amz-Expires': '300', 'key': 'bulk-metadata/ALL_DDEX_TO_CSV_2023-02-10_2023-03-01.csv', # noqa: E501 'x-amz-storage-class': 'STANDARD', }, 'responseElements': { 'x-amz-server-side-encryption': 'AES256', 'x-amz-version-id': 'RXgAv8KgjdSOjkQpigJ.40Rs7Wj5R8QL' }, 'additionalEventData': { 'SignatureVersion': 'SigV4', 'aclRequired': 'Yes', 'CipherSuite': 'ECDHE-RSA-AES128-GCM-SHA256', 'bytesTransferredIn': 15440192, 'SSEApplied': 'Default_SSE_S3', 'AuthenticationMethod': 'QueryString', 'x-amz-id-2': 'LgCSWWf5sMf/BFNtkNemp1JSVN/UTe5ZdahQKKdscIBmE5zWplH4oouWHOBRPkTakYztXygLZGs=', # noqa: E501 'bytesTransferredOut': 0 }, 'requestID': 'M9N768E2HT59BK1F', 'eventID': '743511b0-ecda-4315-9216-093fb8ca93cc', 'readOnly': False, 'resources': [ { 'type': 'AWS::S3::Object', 'ARN': 'arn:aws:s3:::qa-bulk-metadata-ingester/bulk-metadata/ALL_DDEX_TO_CSV_2023-02-10_2023-03-01.json' # noqa: E501 }, { 'accountId': '437795906767', 'type': 'AWS::S3::Bucket', 'ARN': 'arn:aws:s3:::qa-bulk-metadata-ingester' } ], 'eventType': 'AwsApiCall', 'managementEvent': False, 'recipientAccountId': '437795906767', 'eventCategory': 'Data', 'tlsDetails': { 'tlsVersion': 'TLSv1.2', 'cipherSuite': 'ECDHE-RSA-AES128-GCM-SHA256', 'clientProvidedHostHeader': 'qa-bulk-metadata-ingester.s3.us-east-1.amazonaws.com' # noqa: E501 } } }