def setUp(self):
#Create a mock vehicle object
vehicle = mock.create_autospec(Vehicle)
#Create a mock shotManager object
shotmgr = mock.create_autospec(ShotManager)
shotmgr.appMgr = Mock()
#Run the shot constructor
self.shot = multipoint.MultipointShot(vehicle, shotmgr)
#value
self.seek = (.3, 0)
#cable
self.shot.cable = [1]
#mock setCruiseSpeed
self.shot.setCruiseSpeed = Mock()
#mock checkToNotifyApp
self.shot.checkToNotifyApp = Mock()
#attaching
self.shot.attaching = False
评论列表
文章目录