MCPcopy Create free account
hub / github.com/pallets/flask / _TestHandler

Class _TestHandler

tests/test_templating.py:412–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410 called = []
411
412 class _TestHandler(logging.Handler):
413 def handle(self, record):
414 called.append(True)
415 text = str(record.msg)
416 assert "1: trying loader of application 'blueprintapp'" in text
417 assert (
418 "2: trying loader of blueprint 'admin' (blueprintapp.apps.admin)"
419 ) in text
420 assert (
421 "trying loader of blueprint 'frontend' (blueprintapp.apps.frontend)"
422 ) in text
423 assert "Error: the template could not be found" in text
424 assert (
425 "looked up from an endpoint that belongs to the blueprint 'frontend'"
426 ) in text
427 assert "See https://flask.palletsprojects.com/blueprints/#templates" in text
428
429 with app.test_client() as c:
430 monkeypatch.setitem(app.config, "EXPLAIN_TEMPLATE_LOADING", True)

Callers 1

Calls

no outgoing calls

Tested by 1