# Path: aiobotocore/config.py
# class AioConfig(botocore.client.Config):
# 
#     def __init__(self, connector_args=None, **kwargs):
#         super().__init__(**kwargs)
# 
#         self._validate_connector_args(connector_args)
#         self.connector_args = copy.copy(connector_args)
#         if not self.connector_args:
#             self.connector_args = dict()
# 
#         if 'keepalive_timeout' not in self.connector_args:
#             # AWS has a 20 second idle timeout:
#             # https://forums.aws.amazon.com/message.jspa?messageID=215367
#             # and aiohttp default timeout is 30s so we set it to something
#             # reasonable here
#             self.connector_args['keepalive_timeout'] = 12
# 
#     def merge(self, other_config):
#         # Adapted from parent class
#         config_options = copy.copy(self._user_provided_options)
#         config_options.update(other_config._user_provided_options)
#         return AioConfig(self.connector_args, **config_options)
# 
#     @staticmethod
#     def _validate_connector_args(connector_args):
#         if connector_args is None:
#             return
# 
#         for k, v in connector_args.items():
#             # verify_ssl is handled by verify parameter to create_client
#             if k == 'use_dns_cache':
#                 if not isinstance(v, bool):
#                     raise ParamValidationError(
#                         report='{} value must be a boolean'.format(k))
#             elif k in ['keepalive_timeout']:
#                 if not isinstance(v, (float, int)):
#                     raise ParamValidationError(
#                         report='{} value must be a float/int'.format(k))
#             elif k == 'force_close':
#                 if not isinstance(v, bool):
#                     raise ParamValidationError(
#                         report='{} value must be a boolean'.format(k))
#             # limit is handled by max_pool_connections
#             elif k == 'ssl_context':
#                 import ssl
#                 if not isinstance(v, ssl.SSLContext):
#                     raise ParamValidationError(
#                         report='{} must be an SSLContext instance'.format(k))
#             elif k == "resolver":
#                 from aiohttp.abc import AbstractResolver
#                 if not isinstance(v, AbstractResolver):
#                     raise ParamValidationError(
#                         report='{} must be an instance of a AbstractResolver'.format(k))
#             else:
#                 raise ParamValidationError(
#                     report='invalid connector_arg:{}'.format(k))


import asyncio
import random
import string
import aiobotocore.session
import tempfile
import os
import pytest
import aiohttp
from contextlib import AsyncExitStack, ExitStack
from aiobotocore.config import AioConfig
from unittest.mock import patch
from itertools import chain
        # Just for illustration (this test doesn't pass).
        # mock_attributes is a list of 1 element, since we passed a list of 1 element
        # to the patch_attributes marker.
        mock_attributes[0].assert_called_once()
    """
    marker = request.node.get_closest_marker("patch_attributes")
    if marker is None:
        yield
    else:
        with ExitStack() as stack:
            yield [stack.enter_context(patch(**kwargs)) for kwargs in marker.args[0]]


@pytest.fixture
async def s3_client(session, region, config, s3_server, mocking_test, s3_verify,
                    patch_attributes):
    # This depends on mock_attributes because we may want to test event listeners.
    # See the documentation of `mock_attributes` for details.
    kw = moto_config(s3_server) if mocking_test else {}

    async with session.create_client('s3', region_name=region,
                                     config=config, verify=s3_verify, **kw) as client:
        yield client


@pytest.fixture
async def alternative_s3_client(session, alternative_region, signature_version,
                                s3_server, mocking_test):
    kw = moto_config(s3_server) if mocking_test else {}


# Path: aiobotocore/config.py
# class AioConfig(botocore.client.Config):
# 
#     def __init__(self, connector_args=None, **kwargs):
#         super().__init__(**kwargs)
# 
#         self._validate_connector_args(connector_args)
#         self.connector_args = copy.copy(connector_args)
#         if not self.connector_args:
#             self.connector_args = dict()
# 
#         if 'keepalive_timeout' not in self.connector_args:
#             # AWS has a 20 second idle timeout:
#             # https://forums.aws.amazon.com/message.jspa?messageID=215367
#             # and aiohttp default timeout is 30s so we set it to something
#             # reasonable here
#             self.connector_args['keepalive_timeout'] = 12
# 
#     def merge(self, other_config):
#         # Adapted from parent class
#         config_options = copy.copy(self._user_provided_options)
#         config_options.update(other_config._user_provided_options)
#         return AioConfig(self.connector_args, **config_options)
# 
#     @staticmethod
#     def _validate_connector_args(connector_args):
#         if connector_args is None:
#             return
# 
#         for k, v in connector_args.items():
#             # verify_ssl is handled by verify parameter to create_client
#             if k == 'use_dns_cache':
#                 if not isinstance(v, bool):
#                     raise ParamValidationError(
#                         report='{} value must be a boolean'.format(k))
#             elif k in ['keepalive_timeout']:
#                 if not isinstance(v, (float, int)):
#                     raise ParamValidationError(
#                         report='{} value must be a float/int'.format(k))
#             elif k == 'force_close':
#                 if not isinstance(v, bool):
#                     raise ParamValidationError(
#                         report='{} value must be a boolean'.format(k))
#             # limit is handled by max_pool_connections
#             elif k == 'ssl_context':
#                 import ssl
#                 if not isinstance(v, ssl.SSLContext):
#                     raise ParamValidationError(
#                         report='{} must be an SSLContext instance'.format(k))
#             elif k == "resolver":
#                 from aiohttp.abc import AbstractResolver
#                 if not isinstance(v, AbstractResolver):
#                     raise ParamValidationError(
#                         report='{} must be an instance of a AbstractResolver'.format(k))
#             else:
#                 raise ParamValidationError(
#                     report='invalid connector_arg:{}'.format(k))


# Path: tests/conftest.py
import asyncio
import random
import string
import aiobotocore.session
import tempfile
import os
import pytest
import aiohttp
from contextlib import AsyncExitStack, ExitStack
from aiobotocore.config import AioConfig
from unittest.mock import patch
from itertools import chain

        # Just for illustration (this test doesn't pass).
        # mock_attributes is a list of 1 element, since we passed a list of 1 element
        # to the patch_attributes marker.
        mock_attributes[0].assert_called_once()
    """
    marker = request.node.get_closest_marker("patch_attributes")
    if marker is None:
        yield
    else:
        with ExitStack() as stack:
            yield [stack.enter_context(patch(**kwargs)) for kwargs in marker.args[0]]


@pytest.fixture
async def s3_client(session, region, config, s3_server, mocking_test, s3_verify,
                    patch_attributes):
    # This depends on mock_attributes because we may want to test event listeners.
    # See the documentation of `mock_attributes` for details.
    kw = moto_config(s3_server) if mocking_test else {}

    async with session.create_client('s3', region_name=region,
                                     config=config, verify=s3_verify, **kw) as client:
        yield client


@pytest.fixture
async def alternative_s3_client(session, alternative_region, signature_version,
                                s3_server, mocking_test):
    kw = moto_config(s3_server) if mocking_test else {}


    config = AioConfig(