예제 #1
0
    def test_that_when_deleting_cors_succeeds_the_delete_cors_method_returns_true(self):
        '''
        tests True bucket attribute deleted.
        '''
        result = boto_s3_bucket.delete_cors(Bucket='mybucket',
                                        **conn_parameters)

        self.assertTrue(result['deleted'])
예제 #2
0
    def test_that_when_deleting_cors_succeeds_the_delete_cors_method_returns_true(self):
        '''
        tests True bucket attribute deleted.
        '''
        result = boto_s3_bucket.delete_cors(Bucket='mybucket',
                                        **conn_parameters)

        self.assertTrue(result['deleted'])
예제 #3
0
    def test_that_when_deleting_cors_succeeds_the_delete_cors_method_returns_true(
            self):
        """
        tests True bucket attribute deleted.
        """
        result = boto_s3_bucket.delete_cors(Bucket="mybucket",
                                            **conn_parameters)

        self.assertTrue(result["deleted"])
예제 #4
0
 def test_that_when_deleting_cors_fails_the_delete_cors_method_returns_error(self):
     '''
     tests False bucket attribute not deleted.
     '''
     self.conn.delete_bucket_cors.side_effect = ClientError(error_content,
                    'delete_bucket_cors')
     result = boto_s3_bucket.delete_cors(Bucket='mybucket',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('delete_bucket_cors'))
예제 #5
0
 def test_that_when_deleting_cors_fails_the_delete_cors_method_returns_error(self):
     '''
     tests False bucket attribute not deleted.
     '''
     self.conn.delete_bucket_cors.side_effect = ClientError(error_content,
                    'delete_bucket_cors')
     result = boto_s3_bucket.delete_cors(Bucket='mybucket',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('delete_bucket_cors'))
예제 #6
0
def test_that_when_deleting_cors_fails_the_delete_cors_method_returns_error(
        boto_conn):
    '''
    tests False bucket attribute not deleted.
    '''
    boto_conn.delete_bucket_cors.side_effect = exceptions.ClientError(
        error_content, 'delete_bucket_cors')
    result = boto_s3_bucket.delete_cors(Bucket='mybucket',
                                        **pytest.conn_parameters)
    assert result.get(
        'error',
        {}).get('message') == error_message.format('delete_bucket_cors')
 def test_that_when_deleting_cors_fails_the_delete_cors_method_returns_error(
         self):
     """
     tests False bucket attribute not deleted.
     """
     self.conn.delete_bucket_cors.side_effect = ClientError(
         error_content, "delete_bucket_cors")
     result = boto_s3_bucket.delete_cors(Bucket="mybucket",
                                         **conn_parameters)
     assert result.get(
         "error",
         {}).get("message") == error_message.format("delete_bucket_cors")