def import_from_redis(self): keys = self.redis.keys() weekend_keys = filter(lambda key: key.decode()[0] != "w", keys) flights = [] for key in weekend_keys: flights.append(flight.Flight(key, self.redis.get(key))) return flights
def flight_instance(): return flight.Flight(b"2018-01-01BCNSXF20:00", b"20.00")
def weekend(): return [ flight.Flight(b"2018-01-01BCNSXF20:00", b'20.00'), flight.Flight(b"2018-01-03SXFBCN20:00", b'20.00') ]