"""Fixtures for Integration test.""" import boto3 import pytest # noqa # Import data fixtures from tests.integration.data import * # noqa from tests.integration.utils.s3 import S3ClientWrapper from tests.integration.utils.sqs import SQSClientWrapper @pytest.fixture(scope='session') def boto_session(): """Boto session.""" return boto3.Session() @pytest.fixture(scope='session') def sqs_client(boto_session): """SQS client.""" client = boto_session.client('sqs') yield SQSClientWrapper(client) @pytest.fixture(scope='session') def s3_client(boto_session): """S3 client.""" client = boto_session.client('s3') yield S3ClientWrapper(client) @pytest.fixture(scope='function', autouse=True) def cleanup_s3(s3_client): """Delete all objects created during tests.""" s3_client.delete_files() yield