def test_that_when_removing_tags_fails_the_remove_tags_method_returns_false(self):
     '''
     tests False tags not removed.
     '''
     self.conn.remove_tags.side_effect = ClientError(error_content, 'remove_tags')
     with patch.dict(boto_cloudtrail.__salt__, {'boto_iam.get_account_id': MagicMock(return_value='1234')}):
         result = boto_cloudtrail.remove_tags(Name=trail_ret['Name'], a='b', **conn_parameters)
     self.assertFalse(result['tagged'])
    def test_that_when_removing_tags_succeeds_the_remove_tags_method_returns_true(self):
        '''
        tests True tags removed.
        '''
        with patch.dict(boto_cloudtrail.__salt__, {'boto_iam.get_account_id': MagicMock(return_value='1234')}):
            result = boto_cloudtrail.remove_tags(Name=trail_ret['Name'], a='b', **conn_parameters)

        self.assertTrue(result['tagged'])
Example #3
0
 def test_that_when_removing_tags_fails_the_remove_tags_method_returns_false(self):
     '''
     tests False tags not removed.
     '''
     self.conn.remove_tags.side_effect = ClientError(error_content, 'remove_tags')
     with patch.dict(boto_cloudtrail.__salt__, {'boto_iam.get_account_id': MagicMock(return_value='1234')}):
         result = boto_cloudtrail.remove_tags(Name=trail_ret['Name'], a='b', **conn_parameters)
     self.assertFalse(result['tagged'])
Example #4
0
    def test_that_when_removing_tags_succeeds_the_remove_tags_method_returns_true(self):
        '''
        tests True tags removed.
        '''
        with patch.dict(boto_cloudtrail.__salt__, {'boto_iam.get_account_id': MagicMock(return_value='1234')}):
            result = boto_cloudtrail.remove_tags(Name=trail_ret['Name'], a='b', **conn_parameters)

        self.assertTrue(result['tagged'])
 def test_that_when_removing_tags_fails_the_remove_tags_method_returns_false(self):
     """
     tests False tags not removed.
     """
     self.conn.remove_tags.side_effect = ClientError(error_content, "remove_tags")
     with patch.dict(
         boto_cloudtrail.__salt__,
         {"boto_iam.get_account_id": MagicMock(return_value="1234")},
     ):
         result = boto_cloudtrail.remove_tags(
             Name=trail_ret["Name"], a="b", **conn_parameters
         )
     self.assertFalse(result["tagged"])
    def test_that_when_removing_tags_succeeds_the_remove_tags_method_returns_true(self):
        """
        tests True tags removed.
        """
        with patch.dict(
            boto_cloudtrail.__salt__,
            {"boto_iam.get_account_id": MagicMock(return_value="1234")},
        ):
            result = boto_cloudtrail.remove_tags(
                Name=trail_ret["Name"], a="b", **conn_parameters
            )

        self.assertTrue(result["tagged"])