#NEWLINE# def testPreprocessCreateNode( self ) : #NEWLINE# #INDENT# ' Test preprocessing of a create-node request ' #NEWLINE# r = s3_request ( 'test' , 'lhierarchy' , http = 'POST' ) #NEWLINE# parent_node = self . rows [ 'LHIERARCHY1' ] #NEWLINE# h = S3Hierarchy ( 'test_lhierarchy' ) #NEWLINE# link = h . preprocess_create_node ( r , r . id ) #NEWLINE# self . assertNotEqual ( link , None ) #NEWLINE# assertEqual = self . assertEqual #NEWLINE# assertEqual ( link [ 'linktable' ] , 'test_lhierarchy_link' ) #NEWLINE# assertEqual ( link [ 'lkey' ] , 'child_id' ) #NEWLINE# assertEqual ( link [ 'rkey' ] , 'parent_id' ) #NEWLINE# assertEqual ( link [ 'parent_id' ] , parent_node . id )