def test_dead_robot(self):
        '''Authenticate a dead robot.'''
        authenticator = Authenticator()

        robot = Robot("dead_robot_authentication_test", "123")
        robot.set_alive(False)
        with self.assertRaises(AuthenticationFailedError):
            authenticator.authenticate_robot(robot, "123")
    def test_dead_robot(self):
        '''Authenticate a dead robot.'''
        authenticator = Authenticator()

        robot = Robot("dead_robot_authentication_test", "123")
        robot.set_alive(False)
        with self.assertRaises(AuthenticationFailedError):
            authenticator.authenticate_robot(robot, "123")
    def test_dead_robot(self):
        '''Test if ActionManager checks a dead robot.'''
        robot = Robot("test_dead_robot_98176", "1234")
        robot.set_alive(False)
        self._database.add_robot(robot, (3, 2))
        self._database.commit()

        with self.assertRaises(AuthenticationFailedError):
            self._action_manager.do_action("1234", "status", ["test_dead_robot_98176"])
    def test_dead_robot(self):
        '''Test if ActionManager checks a dead robot.'''
        robot = Robot("test_dead_robot_98176", "1234")
        robot.set_alive(False)
        self._database.add_robot(robot, (3, 2))
        self._database.commit()

        with self.assertRaises(AuthenticationFailedError):
            self._action_manager.do_action("1234", "status",
                                           ["test_dead_robot_98176"])