def test_worker_logger_timed_rotation(global_config):
    global_config["logger"]["file_rotate_by"] = "time"
    worker = ChannelWorker(_TASK_MANAGER, global_config["logger"])
    worker.setup_logger()

    assert "TimedRotatingFileHandler" in str(worker.logger.handlers)
def test_worker_logger_sized_rotation(global_config):
    worker = ChannelWorker(_TASK_MANAGER, global_config["logger"])
    worker.setup_logger()

    assert "RotatingFileHandler" in str(worker.logger.handlers)