def test_packaged_themes_loader(self): app = Flask(__name__) themes_iter = packaged_themes_loader(app) themes = list(sorted(themes_iter, key=attrgetter('identifier'))) assert themes[0].identifier == 'cool' assert themes[1].identifier == 'notthis' assert themes[2].identifier == 'plain'
def udata_themes_loader(app): for theme in packaged_themes_loader(app): yield ConfigurableTheme(theme.path)