def setUp(self):
#Create a mock vehicle object
vehicle = mock.create_autospec(Vehicle)
#Create a mock shotManager object
shotmgr = mock.create_autospec(ShotManager)
shotmgr.rcMgr = Mock(specs=['remapper'])
#Run the shot constructor
self.shot = follow.FollowShot(vehicle, shotmgr)
self.shot.pathHandler = mock.create_autospec(pathHandler.PathHandler)
self.shot.pathHandler.cruiseSpeed = 0
#Mock the pathController object
self.shot.followState = FOLLOW_ORBIT
self.shot.pathController = mock.create_autospec(OrbitController)
self.shot.ROIAltitudeOffset = 0.0
self.shot.ROIAltitudeOffset = 0.0
评论列表
文章目录