예제 #1
0
def test_attributes_converts():
    test = KMSMasterKeyProviderConfig(
        botocore_session=MagicMock(__class__=botocore.session.Session),
        key_ids=[sentinel.key_a, sentinel.key_b],
        region_names=[sentinel.region_a, sentinel.region_b])
    assert test.key_ids == (sentinel.key_a, sentinel.key_b)
    assert test.region_names == (sentinel.region_a, sentinel.region_b)
예제 #2
0
def test_attributes_defaults():
    test = KMSMasterKeyProviderConfig()
    assert isinstance(test.botocore_session, botocore.session.Session)
    assert test.key_ids == ()
    assert test.region_names == ()
예제 #3
0
def test_attributes_fails():
    with pytest.raises(TypeError):
        KMSMasterKeyProviderConfig(botocore_session=None)