#NEWLINE# def test_unicode_string( self ) : #NEWLINE# #INDENT# s = u ( 'A Unicode � string' ) #NEWLINE# string = String ( s ) #NEWLINE# unicode_string = six . text_type ( string ) #NEWLINE# self . assertEqual ( unicode_string , unicode_string ) #NEWLINE# self . assertEqual ( s . encode ( 'utf-8' ) , unicode_string . encode ( 'utf-8' ) ) #NEWLINE# self . assertTrue ( ( s . encode ( 'utf-8' ) in string . to_xml ( ) ) )