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