Fix test for logging
This commit is contained in:
parent
421fc7eca3
commit
8c3d461482
@ -68,8 +68,8 @@ class Loader(jinja2.BaseLoader):
|
||||
except OSError as e:
|
||||
source = html_fallback.replace("%ERROR%", html.escape(str(e)))
|
||||
source = source.replace("%FILE%", html.escape(template))
|
||||
log.misc.error("The {} template could not be found at {}".format(
|
||||
template, path))
|
||||
log.misc.exception("The {} template could not be loaded from {}"
|
||||
.format(template, path))
|
||||
# Currently we don't implement auto-reloading, so we always return True
|
||||
# for up-to-date.
|
||||
return source, path, lambda: True
|
||||
|
@ -111,9 +111,8 @@ def test_not_found(caplog):
|
||||
data = jinja.render('does_not_exist.html')
|
||||
assert "The does_not_exist.html template could not be found!" in data
|
||||
|
||||
assert len(caplog.records) == 1
|
||||
assert caplog.records[0].msg.startswith("The does_not_exist.html template"
|
||||
" could not be found at")
|
||||
" could not be loaded from")
|
||||
|
||||
|
||||
def test_utf8():
|
||||
|
Loading…
Reference in New Issue
Block a user