Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def regions_get(version=DEFAULT_API_VERSION, slug=None):
    return factory.region(slug=slug)
Esempio n. 4
0
 def gen():
     return [factory.region(id=i, name=REGIONS[slug], slug=slug)
             for i, slug in enumerate(REGIONS)]
Esempio n. 5
0
def regions_get(version=DEFAULT_API_VERSION, slug=None):
    return factory.region(slug=slug)
Esempio n. 6
0
 def gen():
     return [
         factory.region(id=i, name=REGIONS[slug], slug=slug)
         for i, slug in enumerate(REGIONS)
     ]