Esempio n. 1
0
def test_connections(import_path, connection_fn):
    with staticconf.testing.MockConfiguration(MOCK_CONFIG):
        with mock.patch(import_path, autospec=True) as mock_boto:
            connection_fn()
            mock_boto.assert_called_once_with(
                MOCK_CONFIG['aws_config']['region'],
                **get_boto_creds()
            )
Esempio n. 2
0
def get_test_creds():
    with staticconf.testing.MockConfiguration(MOCK_CONFIG):
        return get_boto_creds()
Esempio n. 3
0
def test_connections(import_path, connection_fn):
    with staticconf.testing.MockConfiguration(MOCK_CONFIG):
        with mock.patch(import_path, autospec=True) as mock_boto:
            connection_fn()
            mock_boto.assert_called_once_with(
                MOCK_CONFIG['aws_config']['region'], **get_boto_creds())