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))
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))
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))