+
+
+def info_args(title, language=None):
+ """ generate some keywords for comfortable BookInfoCreation """
+ slug = unicode(slughifi(title))
+ if language is None:
+ language = u'pol'
+ return {
+ 'title': unicode(title),
+ 'url': WLURI.from_slug(slug),
+ 'about': u"http://wolnelektury.pl/example/URI/%s" % slug,
+ 'language': language,
+ }
+
+
+def get_fixture(path, app=None):
+ if app is not None:
+ mod_path = app.__file__
+ f_path = join(dirname(abspath(mod_path)), 'tests/files', path)
+ else:
+ mod_path = extract_stack(limit=2)[0][0]
+ f_path = join(dirname(abspath(mod_path)), 'files', path)
+ return f_path