From 893e9c47497a5501c679ab760ef5d215dedf08e5 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 14 Jun 2018 17:15:24 +0800 Subject: [PATCH] 'caplog.text()' syntax is deprecated, use 'caplog.text' property instead. --- tests/web/test_logger.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/web/test_logger.py b/tests/web/test_logger.py index 5867157d..08b1b358 100644 --- a/tests/web/test_logger.py +++ b/tests/web/test_logger.py @@ -24,27 +24,27 @@ def test_init_logger(caplog): logger = init_logger(logging.DEBUG) logger.debug("DEBUG1") - assert "DEBUG1" in caplog.text() + assert "DEBUG1" in caplog.text logger.info("INFO1") - assert "INFO1" in caplog.text() + assert "INFO1" in caplog.text logger.warn("WARN1") - assert "WARN1" in caplog.text() + assert "WARN1" in caplog.text logger.error("ERROR1") - assert "ERROR1" in caplog.text() + assert "ERROR1" in caplog.text logger.critical("CRITICAL1") - assert "CRITICAL1" in caplog.text() + assert "CRITICAL1" in caplog.text def test_init_logger_quiet(caplog): logger = init_logger(logging.DEBUG, quiet=True) logger.debug("DEBUG1") - assert "DEBUG1" not in caplog.text() + assert "DEBUG1" not in caplog.text logger.info("INFO1") - assert "INFO1" not in caplog.text() + assert "INFO1" not in caplog.text logger.warn("WARN1") - assert "WARN1" not in caplog.text() + assert "WARN1" not in caplog.text logger.error("ERROR1") - assert "ERROR1" not in caplog.text() + assert "ERROR1" not in caplog.text logger.critical("CRITICAL1") - assert "CRITICAL1" not in caplog.text() + assert "CRITICAL1" not in caplog.text