From f73399bfac0fcee5c8ee502c13e9f7c85cf435ea Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Mon, 22 Jun 2020 13:54:01 -0400 Subject: [PATCH] fix test --- tests/unit/test_cli.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index dd71db9f4..935364f05 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -62,10 +62,8 @@ class CLILoggingTest(AsyncioTestCase): log = log.getChild("lbry") self.assertTrue(log.isEnabledFor(logging.INFO)) self.assertFalse(log.isEnabledFor(logging.DEBUG)) - self.assertFalse(log.isEnabledFor(logging.DEBUG)) - self.assertEqual(len(log.handlers), 2) + self.assertEqual(len(log.handlers), 1) self.assertIsInstance(log.handlers[0], logging.handlers.RotatingFileHandler) - self.assertFalse(log.handlers[1].enabled) async with get_logger(["start", "--verbose"]) as log: self.assertTrue(log.getChild("lbry").isEnabledFor(logging.DEBUG)) @@ -82,11 +80,11 @@ class CLILoggingTest(AsyncioTestCase): async def test_quiet(self): async with get_logger(["start"]) as log: # default is loud log = log.getChild("lbry") - self.assertEqual(len(log.handlers), 3) + self.assertEqual(len(log.handlers), 2) self.assertIs(type(log.handlers[1]), logging.StreamHandler) async with get_logger(["start", "--quiet"]) as log: log = log.getChild("lbry") - self.assertEqual(len(log.handlers), 2) + self.assertEqual(len(log.handlers), 1) self.assertIsNot(type(log.handlers[0]), logging.StreamHandler)