#NEWLINE# def test_unicode_fetches( self ) : #NEWLINE# #INDENT# qn = connection . ops . quote_name #NEWLINE# models . Person ( first_name = 'John' , last_name = 'Doe' ) . save ( ) #NEWLINE# models . Person ( first_name = 'Jane' , last_name = 'Doe' ) . save ( ) #NEWLINE# models . Person ( first_name = 'Mary' , last_name = 'Agnelline' ) . save ( ) #NEWLINE# models . Person ( first_name = 'Peter' , last_name = 'Parker' ) . save ( ) #NEWLINE# models . Person ( first_name = 'Clark' , last_name = 'Kent' ) . save ( ) #NEWLINE# opts2 = models . Person . _meta #NEWLINE# ( f3 , f4 ) = ( opts2 . get_field ( 'first_name' ) , opts2 . get_field ( 'last_name' ) ) #NEWLINE# query2 = ( 'SELECT %s, %s FROM %s ORDER BY %s' % ( qn ( f3 . column ) , qn ( f4 . column ) , connection . introspection . table_name_converter ( opts2 . db_table ) , qn ( opts2 . column ) ) ) #NEWLINE# cursor = connection . cursor ( ) #NEWLINE# cursor . execute ( query2 ) #NEWLINE# self . assertEqual ( cursor . fetchone ( ) , ( 'Clark' , 'Kent' ) ) #NEWLINE# self . assertEqual ( list ( cursor . fetchmany ( 2 ) ) , [ ( 'Jane' , 'Doe' ) , ( 'John' , 'Doe' ) ] ) #NEWLINE# self . assertEqual ( list ( cursor . fetchall ( ) ) , [ ( 'Mary' , 'Agnelline' ) , ( 'Peter' , 'Parker' ) ] )