Ejemplo n.º 1
0
 def assert_expected_unicode(self, t, fname, *args, **kwargs):
     t.write(util.read_input(fname))
     assert not t._v_errors, 'Template errors: %s' % t._v_errors
     expect = util.read_output(fname)
     expect = unicode(expect, 'utf8')
     out = apply(t, args, kwargs)
     util.check_html(expect, out)
Ejemplo n.º 2
0
 def assert_expected_unicode(self, t, fname, *args, **kwargs):
     t.write(util.read_input(fname))
     assert not t._v_errors, 'Template errors: %s' % t._v_errors
     expect = util.read_output(fname)
     expect = unicode(expect, 'utf8')
     out = t(*args, **kwargs)
     util.check_html(expect, out)
Ejemplo n.º 3
0
 def assert_expected_unicode(self, t, fname, *args, **kwargs):
     t.write(util.read_input(fname))
     assert not t._v_errors, 'Template errors: %s' % t._v_errors
     expect = util.read_output(fname)
     if not isinstance(expect, text_type):
         expect = text_type(expect, 'utf-8')
     out = t(*args, **kwargs)
     util.check_html(expect, out)
Ejemplo n.º 4
0
 def assert_expected(self, t, fname, *args, **kwargs):
     t.write(util.read_input(fname))
     assert not t._v_errors, 'Template errors: %s' % t._v_errors
     if self.PREFIX is not None \
             and util.exists_output(self.PREFIX + fname):
         fname = self.PREFIX + fname
     expect = util.read_output(fname)
     out = t(*args, **kwargs)
     util.check_html(expect, out)
Ejemplo n.º 5
0
 def assert_expected(self, t, fname, *args, **kwargs):
     t.write(util.read_input(fname))
     assert not t._v_errors, 'Template errors: %s' % t._v_errors
     expect = util.read_output(fname)
     out = t(*args, **kwargs)
     util.check_html(expect, out)