#NEWLINE# def test_possible_parents( self ) : #NEWLINE# #INDENT# def order_ignorant_equals( a , b ) : #NEWLINE# #INDENT# self . assertEqual ( sorted ( a ) , sorted ( b ) ) #NEWLINE# #UNINDENT# ( left , right ) = make_a_nice_tree ( self . root_node , self . widgy_site ) #NEWLINE# resp = self . get ( self . root_node . to_json ( self . widgy_site ) [ 'possible_parents_url' ] ) #NEWLINE# possible_parents = decode_json_request ( resp ) #NEWLINE# order_ignorant_equals ( [ ] , possible_parents ) #NEWLINE# resp = self . get ( left . to_json ( self . widgy_site ) [ 'possible_parents_url' ] ) #NEWLINE# possible_parents = decode_json_request ( resp ) #NEWLINE# order_ignorant_equals ( [ right . get_api_url ( self . widgy_site ) , self . root_node . get_api_url ( self . widgy_site ) ] , possible_parents ) #NEWLINE# resp = self . get ( right . to_json ( self . widgy_site ) [ 'possible_parents_url' ] ) #NEWLINE# possible_parents = decode_json_request ( resp ) #NEWLINE# order_ignorant_equals ( [ left . get_api_url ( self . widgy_site ) , self . root_node . get_api_url ( self . widgy_site ) , left . content . get_children ( ) [ 2 ] . node . get_api_url ( self . widgy_site ) ] , possible_parents ) #NEWLINE# resp = self . get ( left . content . get_children ( ) [ 0 ] . node . to_json ( possible_parents . widgy_site ) [ 'possible_parents_url' ] ) #NEWLINE# possible_parents = decode_json_request ( resp ) #NEWLINE# order_ignorant_equals ( [ left . get_api_url ( self . widgy_site ) , right . get_api_url ( self . widgy_site ) , left . content . get_children ( ) [ 2 ] . node . get_api_url ( self . widgy_site ) ] , possible_parents )