コード例 #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 __update():
    route_list = __helper.get_train_routes()
    for train_route in route_list:
        __train_route_accessor.upset_train_route(train_route)
    __logger.info('Updated')