def METHOD_NAME(self):
    with self.assertLogs(level=logging.CRITICAL):
        with disable_logging(logging.DEBUG):
            logging.critical("Test")
    with self.assertRaises(AssertionError):  # check that nothing is logged
        with self.assertLogs(level=logging.DEBUG):
            with disable_logging(logging.DEBUG):
                logging.debug("Test")