示例#1
0
 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'
示例#2
0
 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'
示例#3
0
文件: theme.py 项目: guillo-w/udata
def udata_themes_loader(app):
    for theme in packaged_themes_loader(app):
        yield ConfigurableTheme(theme.path)