コード例 #1
0
ファイル: html.py プロジェクト: linhcao1611/Trac-JIRA
 def test_tgettext(self):
     rv = to_fragment(
         tgettext('Back to %(parent)s',
                  parent=tag.a('WikiStart', href='http://localhost/')))
     self.assertEqual(Fragment, type(rv))
     self.assertEqual('Back to <a href="http://localhost/">WikiStart</a>',
                      unicode(rv))
コード例 #2
0
ファイル: html.py プロジェクト: pkdevbox/trac
 def test_tgettext(self):
     rv = to_fragment(tgettext('Back to %(parent)s',
                               parent=tag.a('WikiStart',
                                            href='http://localhost/')))
     self.assertEqual(Fragment, type(rv))
     self.assertEqual('Back to <a href="http://localhost/">WikiStart</a>',
                      unicode(rv))
コード例 #3
0
 def test_tracerror_with_tgettext(self):
     e = TracError(
         tgettext('Back to %(parent)s',
                  parent=tag.a('WikiStart', href='http://localhost/')))
     rv = to_fragment(e)
     self.assertEqual(Fragment, type(rv))
     self.assertEqual('Back to <a href="http://localhost/">WikiStart</a>',
                      str(rv))