def get_realtime(self, sid): """Identical arguments and return value as trafikanten.get_realtime. Will call _get_cached_realtime and _cache_realtime to handle caching properly. Subclasses probably do not need to override this method.""" data = self._get_cached_realtime(sid) if data == None: data = trafikanten.get_realtime(sid) self._cache_realtime(sid, data) return data
def test_invalid_station_id(): assert trafikanten.get_realtime("does_not_exist") == None