def feed_item(**kw): global counter counter += 1 return dict({ 'app': feed_app(), 'brand': brand(), 'carrier': carrier()['slug'], 'collection': collection(), 'id': counter, 'item_type': random.choice(['app', 'collection', 'brand']), 'url': '/api/v2/feed/items/%d/' % counter, 'region': region()['slug'], 'shelf': shelf() }, **kw)
def regions_get(version=DEFAULT_API_VERSION, slug=None): return factory.region(slug=slug)
def gen(): return [factory.region(id=i, name=REGIONS[slug], slug=slug) for i, slug in enumerate(REGIONS)]
def gen(): return [ factory.region(id=i, name=REGIONS[slug], slug=slug) for i, slug in enumerate(REGIONS) ]