Beispiel #1
0
 def _test_controller_setCommand(self):
     '''
     Tests if setCommand works accordingly
     '''
     
     controller = Controller("debug")
     
     controller.setCommand("add, 123")
     assert Controller.getCommand(controller) == ["add", ",", "123"]
     
     controller.setCommand(",,,")
     assert Controller.getCommand(controller) == [",", ",", ","]
     
     controller.setCommand("add 123")
     assert Controller.getCommand(controller) == ["add", "123"]
     
     controller.setCommand("yes")
     assert Controller.getCommand(controller) == ["yes"]
     
     controller.setCommand("")
     assert Controller.getCommand(controller) == []