mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
Close test coverage gaps
(And fix a bug in one test...)
This commit is contained in:
parent
8c9757a062
commit
b75235b3dc
1 changed files with 7 additions and 1 deletions
|
|
@ -291,6 +291,12 @@ class NoninteractiveDisplayTest(unittest.TestCase):
|
|||
self.mock_stdout = mock.MagicMock()
|
||||
self.displayer = display_util.NoninteractiveDisplay(self.mock_stdout)
|
||||
|
||||
def test_notification_no_pause(self):
|
||||
self.displayer.notification("message", 10)
|
||||
string = self.mock_stdout.write.call_args[0][0]
|
||||
|
||||
self.assertTrue("message" in string)
|
||||
|
||||
def test_input(self):
|
||||
d = "an incomputable value"
|
||||
ret = self.displayer.input("message", default=d)
|
||||
|
|
@ -310,7 +316,7 @@ class NoninteractiveDisplayTest(unittest.TestCase):
|
|||
|
||||
def test_checklist(self):
|
||||
d = [1, 3]
|
||||
ret = self.displayer.menu("message", TAGS, default=d)
|
||||
ret = self.displayer.checklist("message", TAGS, default=d)
|
||||
self.assertEqual(ret, (display_util.OK, d))
|
||||
self.assertRaises(errors.MissingCommandlineFlag, self.displayer.checklist, "message", TAGS)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue