Beispiel #1
0
def test_client_init(mocked_init, mocked_client):
    mocked_init.return_value = None

    EcsClient(u'access_key_id', u'secret_access_key', u'region', u'profile')

    mocked_init.assert_called_once_with(aws_access_key_id=u'access_key_id',
                                        aws_secret_access_key=u'secret_access_key',
                                        profile_name=u'profile',
                                        region_name=u'region')
    mocked_client.assert_called_once_with(u'ecs')
Beispiel #2
0
def client(mocked_init, mocked_client):
    mocked_init.return_value = None
    return EcsClient(u'access_key_id', u'secret_access_key', u'region',
                     u'profile', u'session_token')
Beispiel #3
0
def get_client(access_key_id, secret_access_key, region, profile):
    return EcsClient(access_key_id, secret_access_key, region, profile)