|
@@ -58,3 +58,11 @@ class TestController(unittest.TestCase):
|
|
|
def test_process_help_examples(self, mock_print):
|
|
|
Ctrl.Controller.process_help(["examples"])
|
|
|
self.assertTrue(mock_print.called)
|
|
|
+
|
|
|
+ @mock.patch("builtins.print")
|
|
|
+ def test_process_help_invalid(self, mock_print):
|
|
|
+ Ctrl.Controller.process_help(["invalid_keyword"])
|
|
|
+ self.assertTrue(mock_print.called)
|
|
|
+ self.assertEqual(mock_print.call_count, 2)
|
|
|
+ self.assertEqual(mock_print.call_args_list[0][0][0],
|
|
|
+ "Unknown keyword 'invalid_keyword', try 'help;' to get a list of allowed keywords'")
|