def InitShops(self, count): shops = [] for i in range(0, count): shop = Entity(["id", "name", "lat", "lng"], ["id", "name", "lat", "lng"]) product = Entity( ["id", "shop_id", "title", str(i), "1"], ["id", "shop_id", "title", "popularity", "quantity"]) shop.products = SortedListWithKey( key=lambda val: -1 * float(val.popularity)) shop.products.add(product) if i % 2 == 0: shop.tags = set(["tag1", "tag2"]) else: shop.tags = set(["taga", "tagb"]) shops.append(shop) return shops