Пример #1
0
 def test_that_when_creating_a_trail_fails_the_create_trail_method_returns_error(self):
     '''
     tests False trail not created.
     '''
     self.conn.create_trail.side_effect = ClientError(error_content, 'create_trail')
     result = boto_cloudtrail.create(Name=trail_ret['Name'],
                                     S3BucketName=trail_ret['S3BucketName'],
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('create_trail'))
Пример #2
0
 def test_that_when_creating_a_trail_fails_the_create_trail_method_returns_error(self):
     '''
     tests False trail not created.
     '''
     self.conn.create_trail.side_effect = ClientError(error_content, 'create_trail')
     result = boto_cloudtrail.create(Name=trail_ret['Name'],
                                     S3BucketName=trail_ret['S3BucketName'],
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('create_trail'))
Пример #3
0
    def test_that_when_creating_a_trail_succeeds_the_create_trail_method_returns_true(self):
        '''
        tests True trail created.
        '''
        self.conn.create_trail.return_value = trail_ret
        result = boto_cloudtrail.create(Name=trail_ret['Name'],
                                        S3BucketName=trail_ret['S3BucketName'],
                                        **conn_parameters)

        self.assertTrue(result['created'])
Пример #4
0
    def test_that_when_creating_a_trail_succeeds_the_create_trail_method_returns_true(self):
        '''
        tests True trail created.
        '''
        self.conn.create_trail.return_value = trail_ret
        result = boto_cloudtrail.create(Name=trail_ret['Name'],
                                        S3BucketName=trail_ret['S3BucketName'],
                                        **conn_parameters)

        self.assertTrue(result['created'])
    def test_that_when_creating_a_trail_succeeds_the_create_trail_method_returns_true(
        self, ):
        """
        tests True trail created.
        """
        self.conn.create_trail.return_value = trail_ret
        result = boto_cloudtrail.create(Name=trail_ret["Name"],
                                        S3BucketName=trail_ret["S3BucketName"],
                                        **conn_parameters)

        self.assertTrue(result["created"])
Пример #6
0
 def test_that_when_creating_a_trail_fails_the_create_trail_method_returns_error(
     self, ):
     """
     tests False trail not created.
     """
     self.conn.create_trail.side_effect = ClientError(
         error_content, "create_trail")
     result = boto_cloudtrail.create(Name=trail_ret["Name"],
                                     S3BucketName=trail_ret["S3BucketName"],
                                     **conn_parameters)
     assert result.get(
         "error", {}).get("message") == error_message.format("create_trail")