def test_get_helpers(self): app = Flask(__name__) app.config['THEME_PATHS'] = [join(TESTS, 'morethemes')] setup_themes(app, app_identifier='testing') with app.test_request_context('/'): cool = app.theme_manager.themes['cool'] plain = app.theme_manager.themes['plain'] assert get_theme('cool') is cool assert get_theme('plain') is plain tl = get_themes_list() assert tl[0] is cool assert tl[1] is plain try: get_theme('notthis') except KeyError: pass else: raise AssertionError("Getting a nonexistent theme should " "raised KeyError")
def themes(): themes = get_themes_list() return render('themes.html', themes=themes)
def themes(): themes = get_themes_list() return render_template("admin/themes.html", themes=themes)
def themes_list(): _themes = themes.get_themes_list() return render('themes/list.html', themes=_themes)