#NEWLINE# def test_TSO_result_type( self ) : #NEWLINE# #INDENT# ' Tests TwitterSearchOrder.set_result_type() ' #NEWLINE# tso = self . getCopy ( ) #NEWLINE# correct_values = [ 'recent' , 'mixed' , 'popular' ] #NEWLINE# for value in correct_values : #NEWLINE# #INDENT# tso . set_result_type ( value ) #NEWLINE# cor = ( '%s&result_type=%s' % ( self . __tso . create_search_url ( ) , cor ) ) #NEWLINE# self . assertEqualQuery ( tso . create_search_url ( ) , cor ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# tso . set_result_type ( self . generateString ( ) ) #NEWLINE# self . assertTrue ( False , ( 'Not raising exception for %s' % value ) ) #NEWLINE# #UNINDENT# except TwitterSearchException as e : #NEWLINE# #INDENT# self . assertEqual ( e . code , 1003 , 'Wrong exception code' )