def test_user_link_unicode():
 u = UserProfile(username=u'jm\xfcller', display_name=u'J\xfcrgen M\xfcller', pk=1)
 assert (user_link(u) == (u'<a href="%s" title="%s">J\xfcrgen M\xfcller</a>' % (u.get_url_path(), u.name)))
 u = UserProfile(username='\xe5\xaf\x92\xe6\x98\x9f', pk=1)
 assert (user_link(u) == (u'<a href="%s" title="%s">%s</a>' % (u.get_url_path(), u.name, u.username)))

def test_user_link_unicode ( ) : u = UserProfile ( username = u'jm\xfcller' , display_name = u'J\xfcrgen M\xfcller' , pk = 1 ) assert ( user_link ( u ) == ( u'<a href="%s" title="%s">J\xfcrgen M\xfcller</a>' % ( u . get_url_path ( ) , u . name ) ) ) u = UserProfile ( username = '\xe5\xaf\x92\xe6\x98\x9f' , pk = 1 ) assert ( user_link ( u ) == ( u'<a href="%s" title="%s">%s</a>' % ( u . get_url_path ( ) , u . name , u . username ) ) )
make sure helper wont choke on unicode input .