#NEWLINE# def test_search( self ) : #NEWLINE# #INDENT# rsrc1 = self . mkrsrc ( 'rsrc_a' ) #NEWLINE# rsrc2 = self . mkrsrc ( 'rsrc_a' , description = 'descr_a' ) #NEWLINE# rsrc3 = self . mkrsrc ( 'rsrc_b' , description = 'descr_b' ) #NEWLINE# rsrc4 = self . mkrsrc ( 'f_rsrc_c' , description = 'descr_b' , organization = 'org_a' ) #NEWLINE# rsrc5 = self . mkrsrc ( 'f_rsrc_d' , organization = 'org_a' , division = 'div_a' ) #NEWLINE# rsrc6 = self . mkrsrc ( 'f_rsrc_e' , division = 'div_a' , organization = 'orb_c' ) #NEWLINE# self . verify_ids ( self . get ( '/api/resources/search?qs=' ) , [ rsrc1 , rsrc2 , rsrc3 , rsrc4 , rsrc5 , rsrc6 ] ) #NEWLINE# self . assertEquals ( self . get ( '/api/resources/search?qs=fail' ) , list ( ) ) #NEWLINE# self . verify_ids ( self . get ( '/api/resources/search?qs=f_rsrc_' ) , [ rsrc4 , rsrc5 , rsrc6 ] ) #NEWLINE# self . verify_ids ( self . get ( '/api/resources/search?qs=rsrc_c' ) , [ rsrc4 ] ) #NEWLINE# self . verify_ids ( self . get ( '/api/resources/search?qs=descr_b' ) , [ rsrc3 , rsrc4 ] ) #NEWLINE# self . verify_ids ( self . get ( '/api/resources/search?qs=org_a' ) , [ rsrc4 , rsrc5 ] ) #NEWLINE# self . verify_ids ( self . get ( '/api/resources/search?qs=div_a' ) , [ rsrc5 , rsrc6 ] )