def ensure_clean_slate(self): lambda_function = LambdaFunction('test-function') if lambda_function.exists(): lambda_function.delete() lambda_role = Role('lambdapool-role-test-function') if lambda_role.exists(): lambda_role.delete()
def test_role_delete(self): role = Role('test-role') role.delete() assert role.exists() == False
def test_role_create(self): role = Role('test-role') with pytest.raises(AWSError): role.create()
def test_role_exists(self): role = Role('test-role') assert role.exists() == True
def teardown_method(self): role = Role('test-role') if role.exists(): role.delete()
def setup_role(self): role = Role('test-role') role.create()
def test_role_get_arn(self): role = Role('test-role') with pytest.raises(AWSError): role.get_arn()
def test_role_delete(self): role = Role('test-role') with pytest.raises(AWSError): role.delete()
def test_role_create(self): role = Role('test-role') role.create() assert role.get_role().name == 'test-role'
def setup_role(self): self.role = Role('test-role') self.role.create()
def test_role_get_arn(self): role = Role('test-role') assert role.get_arn() == get_role_arn('test-role')