Ejemplo n.º 1
0
    def test_that_when_putting_logging_succeeds_the_put_logging_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_logging(Bucket='mybucket',
                                        TargetBucket='arn:::::',
                                        TargetPrefix='asdf',
                                        TargetGrants='[]',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Ejemplo n.º 2
0
    def test_that_when_putting_logging_succeeds_the_put_logging_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_logging(Bucket='mybucket',
                                        TargetBucket='arn:::::',
                                        TargetPrefix='asdf',
                                        TargetGrants='[]',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Ejemplo n.º 3
0
    def test_that_when_putting_logging_succeeds_the_put_logging_method_returns_true(
        self, ):
        """
        tests True bucket updated.
        """
        result = boto_s3_bucket.put_logging(Bucket="mybucket",
                                            TargetBucket="arn:::::",
                                            TargetPrefix="asdf",
                                            TargetGrants="[]",
                                            **conn_parameters)

        self.assertTrue(result["updated"])
Ejemplo n.º 4
0
 def test_that_when_putting_logging_fails_the_put_logging_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_logging.side_effect = ClientError(error_content,
                    'put_bucket_logging')
     result = boto_s3_bucket.put_logging(Bucket='mybucket',
                                     TargetBucket='arn:::::',
                                     TargetPrefix='asdf',
                                     TargetGrants='[]',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_logging'))
Ejemplo n.º 5
0
 def test_that_when_putting_logging_fails_the_put_logging_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_logging.side_effect = ClientError(error_content,
                    'put_bucket_logging')
     result = boto_s3_bucket.put_logging(Bucket='mybucket',
                                     TargetBucket='arn:::::',
                                     TargetPrefix='asdf',
                                     TargetGrants='[]',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_logging'))
 def test_that_when_putting_logging_fails_the_put_logging_method_returns_error(
         self):
     """
     tests False bucket not updated.
     """
     self.conn.put_bucket_logging.side_effect = ClientError(
         error_content, "put_bucket_logging")
     result = boto_s3_bucket.put_logging(Bucket="mybucket",
                                         TargetBucket="arn:::::",
                                         TargetPrefix="asdf",
                                         TargetGrants="[]",
                                         **conn_parameters)
     assert result.get(
         "error",
         {}).get("message") == error_message.format("put_bucket_logging")