From 3f1c6e4a9cf6ad37d49f32732eea96d4e54b97a7 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 26 Jun 2015 16:29:13 -0700 Subject: [PATCH] Fixed reporter coverage --- letsencrypt/tests/reporter_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/letsencrypt/tests/reporter_test.py b/letsencrypt/tests/reporter_test.py index 2248e7caf..c43511208 100644 --- a/letsencrypt/tests/reporter_test.py +++ b/letsencrypt/tests/reporter_test.py @@ -17,6 +17,13 @@ class ReporterTest(unittest.TestCase): def tearDown(self): sys.stdout = self.old_stdout + def test_multiline_message(self): + self.reporter.add_message("Line 1\nLine 2", self.reporter.LOW_PRIORITY) + self.reporter.atexit_print_messages() + output = sys.stdout.getvalue() + self.assertTrue("Line 1\n" in output) + self.assertTrue("Line 2" in output) + def test_tty_print_empty(self): sys.stdout.isatty = lambda: True self.test_no_tty_print_empty()