def reset(controller=None): if controller is None: controller = control.Controller() controller.on_client_changed(port) ready = QtTest.QSignalSpy(controller.ready) assert_true(ready.wait(1000)) count = len(ready) controller.reset() ready.wait(1000) assert_equals(len(ready), count + 1) assert_true("ready" in controller.states) return controller
def validate(controller=None): """Publish current state Argument: plugins (list): List of plug-ins to include plugin (str): Name of plug-in to repair """ if controller is None: controller = control.Controller() controller.on_client_changed(port) finished = QtTest.QSignalSpy(controller.finished) count = len(finished) controller.validate() finished.wait(1000) assert_equals(len(finished), count + 1) assert_true("finished" in controller.states) return controller