def test_get_template__template_encoding(self): """ Test get_template(): template_encoding attribute. """ view = NonAscii() self.assertRaises(UnicodeDecodeError, self._assert_get_template, view, 'foo') view.template_encoding = 'utf-8' self._assert_get_template(view, u"non-ascii: é")