示例#1
0
    def test_that_when_deleting_a_policy_succeeds_the_delete_policy_method_returns_true(self):
        '''
        tests True policy deleted.
        '''
        result = boto_iot.delete_policy(policyName='testpolicy',
                                        **conn_parameters)

        self.assertTrue(result['deleted'])
示例#2
0
 def test_that_when_deleting_a_policy_fails_the_delete_policy_method_returns_false(self):
     '''
     tests False policy not deleted.
     '''
     self.conn.delete_policy.side_effect = ClientError(error_content, 'delete_policy')
     result = boto_iot.delete_policy(policyName='testpolicy',
                                     **conn_parameters)
     self.assertFalse(result['deleted'])
    def test_that_when_deleting_a_policy_succeeds_the_delete_policy_method_returns_true(
        self,
    ):
        """
        tests True policy deleted.
        """
        result = boto_iot.delete_policy(policyName="testpolicy", **conn_parameters)

        assert result["deleted"]
示例#4
0
def test_that_when_deleting_a_policy_fails_the_delete_policy_method_returns_false(
        boto_conn):
    '''
    tests False policy not deleted.
    '''
    boto_conn.delete_policy.side_effect = exceptions.ClientError(
        error_content, 'delete_policy')
    result = boto_iot.delete_policy(policyName='testpolicy',
                                    **pytest.conn_parameters)
    assert not result['deleted']