def test_that_when_starting_logging_succeeds_the_start_logging_method_returns_true(self): ''' tests True logging started. ''' result = boto_cloudtrail.start_logging(Name=trail_ret['Name'], **conn_parameters) self.assertTrue(result['started'])
def test_that_when_start_logging_fails_the_start_logging_method_returns_false(self): ''' tests False logging not started. ''' self.conn.describe_trails.return_value = {'trailList': []} self.conn.start_logging.side_effect = ClientError(error_content, 'start_logging') result = boto_cloudtrail.start_logging(Name=trail_ret['Name'], **conn_parameters) self.assertFalse(result['started'])
def test_that_when_starting_logging_succeeds_the_start_logging_method_returns_true( self, ): """ tests True logging started. """ result = boto_cloudtrail.start_logging(Name=trail_ret["Name"], **conn_parameters) self.assertTrue(result["started"])
def test_that_when_start_logging_fails_the_start_logging_method_returns_false( self): """ tests False logging not started. """ self.conn.describe_trails.return_value = {"trailList": []} self.conn.start_logging.side_effect = ClientError( error_content, "start_logging") result = boto_cloudtrail.start_logging(Name=trail_ret["Name"], **conn_parameters) self.assertFalse(result["started"])