示例#1
0
 def __print_main_help_information(self):
     self.__output_service.print_line(
         "These are the possible interactions:")
     for command in CommandParser.get_valid_commands():
         self.__output_service.print_line(command)
     self.__output_service.print_line(
         "for more information type in the command and -h or --help.")
def test_input_help_prints_help_info(mocked_cli, mocked_input):
    user_input = [
        "help",
        "quit",
    ]
    expected = [call("These are the possible interactions:")]
    expected += [call(info) for info in CommandParser.get_valid_commands()]
    expected += [
        call("for more information type in the command and -h or --help."),
        call("Finished")
    ]
    mocked_input.side_effect = user_input
    Controller().start_interaction()
    mocked_cli.print_line.asser_has_calls(expected)