def test_region_host(self, auth, credentials, settings, region_name, host, mock_time):
        provider = S3Provider(auth, credentials, settings)
        orig_host = provider.connection.host

        region_url = provider.bucket.generate_url(
            100,
            'GET',
            query_parameters={'location': ''},
        )
        aiohttpretty.register_uri('GET', region_url, status=200, body=location_response(region_name))

        yield from provider._check_region()
        assert provider.connection.host == host
def provider(auth, credentials, settings):
    provider = S3Provider(auth, credentials, settings)
    provider._check_region = MockCoroutine()
    return provider
Example #3
0
def provider(auth, credentials, settings):
    return S3Provider(auth, credentials, settings)