#NEWLINE# def test_dump_simple( self ) : #NEWLINE# #INDENT# expected = [ 'id,username' , ( '%s,user-0' % self . users [ 0 ] . id ) , ( '%s,user-1' % self . users [ 1 ] . id ) , ( '%s,user-2' % self . users [ 2 ] . id ) ] #NEWLINE# self . assertCSV ( User . select ( ) . order_by ( User . id ) , expected ) #NEWLINE# self . assertCSV ( User . select ( ) . order_by ( User . id ) , expected [ 1 : ] , include_header = False ) #NEWLINE# user_0_id = self . users [ 0 ] . id #NEWLINE# self . users [ 0 ] . username = '"herps", derp' #NEWLINE# self . users [ 0 ] . save ( ) #NEWLINE# query = User . select ( ) . where ( ( User . id == user_0_id ) ) #NEWLINE# self . assertCSV ( query , [ 'id,username' , ( '%s,"""herps"", derp"' % user_0_id ) ] )