コード例 #1
0
ファイル: boto_s3_bucket_test.py プロジェクト: bryson/salt
    def test_that_when_deleting_lifecycle_configuration_succeeds_the_delete_lifecycle_configuration_method_returns_true(self):
        '''
        tests True bucket attribute deleted.
        '''
        result = boto_s3_bucket.delete_lifecycle_configuration(Bucket='mybucket',
                                        **conn_parameters)

        self.assertTrue(result['deleted'])
コード例 #2
0
ファイル: boto_s3_bucket_test.py プロジェクト: jiangf13/salt
    def test_that_when_deleting_lifecycle_configuration_succeeds_the_delete_lifecycle_configuration_method_returns_true(self):
        '''
        tests True bucket attribute deleted.
        '''
        result = boto_s3_bucket.delete_lifecycle_configuration(Bucket='mybucket',
                                        **conn_parameters)

        self.assertTrue(result['deleted'])
コード例 #3
0
    def test_that_when_deleting_lifecycle_configuration_succeeds_the_delete_lifecycle_configuration_method_returns_true(
        self, ):
        """
        tests True bucket attribute deleted.
        """
        result = boto_s3_bucket.delete_lifecycle_configuration(
            Bucket="mybucket", **conn_parameters)

        self.assertTrue(result["deleted"])
コード例 #4
0
ファイル: boto_s3_bucket_test.py プロジェクト: bryson/salt
 def test_that_when_deleting_lifecycle_configuration_fails_the_delete_lifecycle_configuration_method_returns_error(self):
     '''
     tests False bucket attribute not deleted.
     '''
     self.conn.delete_bucket_lifecycle.side_effect = ClientError(error_content,
                    'delete_bucket_lifecycle_configuration')
     result = boto_s3_bucket.delete_lifecycle_configuration(Bucket='mybucket',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('delete_bucket_lifecycle_configuration'))
コード例 #5
0
ファイル: boto_s3_bucket_test.py プロジェクト: jiangf13/salt
 def test_that_when_deleting_lifecycle_configuration_fails_the_delete_lifecycle_configuration_method_returns_error(self):
     '''
     tests False bucket attribute not deleted.
     '''
     self.conn.delete_bucket_lifecycle.side_effect = ClientError(error_content,
                    'delete_bucket_lifecycle_configuration')
     result = boto_s3_bucket.delete_lifecycle_configuration(Bucket='mybucket',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('delete_bucket_lifecycle_configuration'))
コード例 #6
0
def test_that_when_deleting_lifecycle_configuration_fails_the_delete_lifecycle_configuration_method_returns_error(
        boto_conn):
    '''
    tests False bucket attribute not deleted.
    '''
    boto_conn.delete_bucket_lifecycle.side_effect = exceptions.ClientError(
        error_content, 'delete_bucket_lifecycle_configuration')
    result = boto_s3_bucket.delete_lifecycle_configuration(
        Bucket='mybucket', **pytest.conn_parameters)
    assert result.get('error', {}).get('message') == error_message.format(
        'delete_bucket_lifecycle_configuration')
コード例 #7
0
 def test_that_when_deleting_lifecycle_configuration_fails_the_delete_lifecycle_configuration_method_returns_error(
     self, ):
     """
     tests False bucket attribute not deleted.
     """
     self.conn.delete_bucket_lifecycle.side_effect = ClientError(
         error_content, "delete_bucket_lifecycle_configuration")
     result = boto_s3_bucket.delete_lifecycle_configuration(
         Bucket="mybucket", **conn_parameters)
     assert result.get("error", {}).get("message") == error_message.format(
         "delete_bucket_lifecycle_configuration")