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() )
def get_test_creds(): with staticconf.testing.MockConfiguration(MOCK_CONFIG): return get_boto_creds()
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())