Beispiel #1
0
 def test_create_trackmap(self):
     tm = TrackMap.create_new()
     self.assertEqual(tm.name, TrackMap.DEFAULT_TRACK_NAME)
     self.assertEqual(tm.configuration, TrackMap.DEFAULT_CONFIGURATION)
     self.assertEqual(len(tm.track_id), 32)
     epoch_time = time_to_epoch(tm.created)
     self.assertTrue(epoch_time > 0)
     self.assertTrue(len(tm.map_points) == 0)
     self.assertTrue(len(tm.sector_points) == 0)
 def test_create_trackmap(self):
     tm = TrackMap.create_new()
     self.assertEqual(tm.name, TrackMap.DEFAULT_TRACK_NAME)
     self.assertEqual(tm.configuration, TrackMap.DEFAULT_CONFIGURATION)
     self.assertEqual(len(tm.track_id), 32)
     epoch_time = time_to_epoch(tm.created)
     self.assertTrue(epoch_time > 0)
     self.assertTrue(len(tm.map_points) == 0)
     self.assertTrue(len(tm.sector_points) == 0)
 def __init__(self, rc_api, databus, track_manager, current_point=None, prompt_track_creation=False, ** kwargs):
     super(TrackBuilderView, self).__init__(**kwargs)
     self.register_event_type('on_track_complete')
     self.register_event_type('on_title')
     self._rc_api = rc_api
     self._databus = databus
     self._prompt_track_creation = prompt_track_creation
     self._track_manager = track_manager
     self._current_point = current_point
     self._screens = []
     self._track = TrackMap.create_new()
     self._track.custom = True
Beispiel #4
0
 def __init__(self,
              rc_api,
              databus,
              track_manager,
              current_point=None,
              prompt_track_creation=False,
              **kwargs):
     super(TrackBuilderView, self).__init__(**kwargs)
     self.register_event_type('on_track_complete')
     self.register_event_type('on_title')
     self._rc_api = rc_api
     self._databus = databus
     self._prompt_track_creation = prompt_track_creation
     self._track_manager = track_manager
     self._current_point = current_point
     self._screens = []
     self._track = TrackMap.create_new()
     self._track.custom = True