def METHOD_NAME(caplog):
    job_log = JobLogger()
    job_log.warning("This is a warning!")
    job_log.error("This is an error!")
    logger = logging.getLogger(__name__)
    job_log.write_to_logger(logger)
    assert "This is a warning!" in caplog.text
    assert "This is an error!" in caplog.text