#NEWLINE# def test_TSO_setURL( self ) : #NEWLINE# #INDENT# ' Tests TwitterSearchOrder.set_search_url() ' #NEWLINE# tso1 = self . getCopy ( ) #NEWLINE# tso1 . set_search_url ( '?q=test1+test2&count=77&until=2013-07-10&locale=en' ) #NEWLINE# self . assertFalse ( tso1 . question_filter ) #NEWLINE# self . assertFalse ( tso1 . link_filter ) #NEWLINE# self . assertTrue ( ( tso1 . source_filter is None ) ) #NEWLINE# self . assertTrue ( ( tso1 . attitude_filter is None ) ) #NEWLINE# tso2 = TwitterSearchOrder ( ) #NEWLINE# tso2 . set_keywords ( [ 'test1' , 'test2' ] ) #NEWLINE# tso2 . set_count ( 77 ) #NEWLINE# tso2 . set_until ( date ( 2013 , 7 , 10 ) ) #NEWLINE# tso2 . set_locale ( 'en' ) #NEWLINE# self . assertEqualQuery ( tso1 . create_search_url ( ) , tso2 . create_search_url ( ) , 'Query strings NOT equal' ) #NEWLINE# source = 'alice' #NEWLINE# tso3 = self . getCopy ( ) #NEWLINE# tso3 . set_search_url ( ( '?q=foobar+%3A%29+%3F+filter%3Alinks+source%3A' + source ) ) #NEWLINE# self . assertTrue ( tso4 . attitude_filter ) #NEWLINE# self . assertTrue ( tso3 . question_filter ) #NEWLINE# self . assertTrue ( tso3 . link_filter ) #NEWLINE# self . assertEqual ( tso3 . source_filter , source ) #NEWLINE# tso4 = TwitterSearchOrder ( ) #NEWLINE# tso4 . set_question_filter ( ) #NEWLINE# tso4 . set_positive_attitude_filter ( ) #NEWLINE# tso4 . set_link_filter ( ) #NEWLINE# tso4 . set_source_filter ( source ) #NEWLINE# tso4 . add_keyword ( 'foobar' ) #NEWLINE# self . assertEqualQuery ( tso3 . create_search_url ( ) , tso4 . create_search_url ( ) , 'Query strings NOT equal' )