Ejemplo n.º 1
0
    def find_station(self, term):
        """Identical arguments and return value as trafikanten.find_station.
        Will call _get_cached_search and _cache_search to handle caching
        properly. Subclasses probably do not need to override this method."""
        data = self._get_cached_search(term)
        if data == None:
            data = trafikanten.find_station(term)
            self._cache_search(term, data)

        return data
Ejemplo n.º 2
0
def test_unicode_term_handling():
    term = u"østerås"
    assert trafikanten.find_station(term)