예제 #1
0
    def test_train_routes_accessor(self):
        train_route_accessor.reset()
        train_route = TrainRoute()
        train_route.line_name = 'Den-en-Toshi'
        train_route.stations = ['Shibuya', 'Aobadai', 'Eda']

        train_route_accessor.upset_train_route(train_route)
        post_train_route = train_route_accessor.get_train_route_by_line('Den-en-Toshi')
        self.assertEqual(post_train_route.line_name, train_route.line_name)
        self.assertSequenceEqual(post_train_route.stations, train_route.stations)
예제 #2
0
 def test_train_fetcher(self):
     train_route_accessor.reset()
     train_info_fetcher.start()
     routes = train_route_accessor.get_all_train_routes()
     self.assertIsNotNone(routes)
     self.assertTrue(len(routes) > 0)