def testInit(self): """ testInit makes assertations about things that should happen when a HelperRobot is created. """ mediator = RobotMediator() helper = HelperRobot(mediator) # Is helper an instance of HelperRobot? self.assertIsInstance(helper, HelperRobot) # Is helper also an instance of Robot? self.assertIsInstance(helper, Robot) # Robot should not be working on a task yet. self.assertFalse(helper.isRunning()) # helper should have been added to mediator's # list of robots. self.assertIn(helper, mediator.getRobots())