def show_browse_methods(): '''Default view. Displays the different ways to browse the site.''' items = [{ 'label': ctg, 'path': plugin.url_for('show_genres', category=ctg), } for ctg in api.get_categories()] return items
def index(): '''The main view, lists available categories.''' items = [{ 'path': plugin.url_for('show_category', url=item['url']), 'label': item['title'], } for item in get_categories()] return items
def test_get_categories(self): items = api.get_categories() self.assertEqual(items, [u'Movie Billboards', u'Serials', u'Silent Films'])