def METHOD_NAME(self):
    osc.conf.config["verbose"] = 0
    stdout = io.StringIO()
    stderr = io.StringIO()
    with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
        print_msg("foo", "bar", print_to="verbose")
    self.assertEqual("", stdout.getvalue())
    self.assertEqual("", stderr.getvalue())
    osc.conf.config["verbose"] = 1
    stdout = io.StringIO()
    stderr = io.StringIO()
    with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
        print_msg("foo", "bar", print_to="verbose")
    self.assertEqual("foo bar\n", stdout.getvalue())
    self.assertEqual("", stderr.getvalue())
    osc.conf.config["verbose"] = 0
    osc.conf.config["debug"] = 1
    stdout = io.StringIO()
    stderr = io.StringIO()
    with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
        print_msg("foo", "bar", print_to="verbose")
    self.assertEqual("foo bar\n", stdout.getvalue())
    self.assertEqual("", stderr.getvalue())