Ejemplo n.º 1
0
    def test_when_check_if_all_request_were_executed_then_does_not_notify_when_todo_queue_full(
            self):
        network_ctrl = MagicMock()
        ctrl = RobotController(MagicMock(), MagicMock(), network_ctrl,
                               MagicMock())
        ctrl._stm_commands_todo.append({'command': Command.GRAB})

        ctrl.check_if_all_request_were_executed()

        self.assertFalse(network_ctrl.called)
Ejemplo n.º 2
0
    def test_when_robot_initialized_check_if_all_request_were_executed_then_does_not_notify_network(
            self):
        network_ctrl = MagicMock()
        ctrl = RobotController(MagicMock(), MagicMock(), network_ctrl,
                               MagicMock())

        ctrl.check_if_all_request_were_executed()
        ctrl.check_if_all_request_were_executed()
        ctrl.check_if_all_request_were_executed()

        self.assertFalse(network_ctrl.send_feedback.called)