Exemplo n.º 1
0
 def test_that_when_listing_bucket_fails_the_list_bucket_method_returns_error(self):
     '''
     tests False bucket error.
     '''
     self.conn.list_buckets.side_effect = ClientError(error_content, 'list_buckets')
     result = boto_s3_bucket.list(**conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('list_buckets'))
Exemplo n.º 2
0
 def test_that_when_listing_bucket_fails_the_list_bucket_method_returns_error(self):
     '''
     tests False bucket error.
     '''
     self.conn.list_buckets.side_effect = ClientError(error_content, 'list_buckets')
     result = boto_s3_bucket.list(**conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('list_buckets'))
Exemplo n.º 3
0
    def test_that_when_listing_buckets_succeeds_the_list_buckets_method_returns_true(self):
        '''
        tests True buckets listed.
        '''
        self.conn.list_buckets.return_value = deepcopy(list_ret)
        result = boto_s3_bucket.list(**conn_parameters)

        self.assertTrue(result['Buckets'])
Exemplo n.º 4
0
    def test_that_when_listing_buckets_succeeds_the_list_buckets_method_returns_true(self):
        '''
        tests True buckets listed.
        '''
        self.conn.list_buckets.return_value = deepcopy(list_ret)
        result = boto_s3_bucket.list(**conn_parameters)

        self.assertTrue(result['Buckets'])
Exemplo n.º 5
0
def test_that_when_listing_buckets_succeeds_the_list_buckets_method_returns_true(
        boto_conn):
    '''
    tests True buckets listed.
    '''
    boto_conn.list_buckets.return_value = deepcopy(list_ret)
    result = boto_s3_bucket.list(**pytest.conn_parameters)

    assert result['Buckets']
    def test_that_when_listing_buckets_succeeds_the_list_buckets_method_returns_true(
        self, ):
        """
        tests True buckets listed.
        """
        self.conn.list_buckets.return_value = deepcopy(list_ret)
        result = boto_s3_bucket.list(**conn_parameters)

        assert result["Buckets"]
Exemplo n.º 7
0
 def test_that_when_listing_bucket_fails_the_list_bucket_method_returns_false(self):
     '''
     tests False no bucket listed.
     '''
     ret = deepcopy(list_ret)
     log.info(ret)
     ret['Buckets'] = list()
     self.conn.list_buckets.return_value = ret
     result = boto_s3_bucket.list(**conn_parameters)
     self.assertFalse(result['Buckets'])
Exemplo n.º 8
0
 def test_that_when_listing_bucket_fails_the_list_bucket_method_returns_false(self):
     '''
     tests False no bucket listed.
     '''
     ret = deepcopy(list_ret)
     log.info(ret)
     ret['Buckets'] = list()
     self.conn.list_buckets.return_value = ret
     result = boto_s3_bucket.list(**conn_parameters)
     self.assertFalse(result['Buckets'])
Exemplo n.º 9
0
def test_that_when_listing_bucket_fails_the_list_bucket_method_returns_error(
        boto_conn):
    '''
    tests False bucket error.
    '''
    boto_conn.list_buckets.side_effect = exceptions.ClientError(
        error_content, 'list_buckets')
    result = boto_s3_bucket.list(**pytest.conn_parameters)
    assert result.get(
        'error', {}).get('message') == error_message.format('list_buckets')
 def test_that_when_listing_bucket_fails_the_list_bucket_method_returns_error(
         self):
     """
     tests False bucket error.
     """
     self.conn.list_buckets.side_effect = ClientError(
         error_content, "list_buckets")
     result = boto_s3_bucket.list(**conn_parameters)
     assert result.get(
         "error", {}).get("message") == error_message.format("list_buckets")