MCPcopy
hub / github.com/django/django / test_template_encoding

Method test_template_encoding

tests/view_tests/tests/test_debug.py:451–462  ·  view source on GitHub ↗

The templates are loaded directly, not via a template loader, and should be opened as utf-8 charset as is the default specified on template engines.

(self)

Source from the content-addressed store, hash-verified

449 )
450
451 def test_template_encoding(self):
452 """
453 The templates are loaded directly, not via a template loader, and
454 should be opened as utf-8 charset as is the default specified on
455 template engines.
456 """
457 with mock.patch.object(DebugPath, "open") as m:
458 default_urlconf(None)
459 m.assert_called_once_with(encoding="utf-8")
460 m.reset_mock()
461 technical_404_response(mock.MagicMock(), mock.Mock())
462 m.assert_called_once_with(encoding="utf-8")
463
464 def test_technical_404_converter_raise_404(self):
465 with mock.patch.object(IntConverter, "to_python", side_effect=Http404):

Callers

nothing calls this directly

Calls 2

default_urlconfFunction · 0.90
technical_404_responseFunction · 0.90

Tested by

no test coverage detected