#NEWLINE# def test_create_collection_node_pointer_to_itself( self ) : #NEWLINE# #INDENT# res = self . app . post_json_api ( self . url , self . post_payload ( self . collection . _id ) , auth = self . user_one . auth , expect_errors = True ) #NEWLINE# res_json = res . json #NEWLINE# assert_equal ( res . status_code , 400 ) #NEWLINE# error = res_json [ 'errors' ] [ 0 ] #NEWLINE# assert_in ( 'detail' , error ) #NEWLINE# assert_equal ( "Target Node '{}' not found." . format ( self . collection . _id ) , error [ 'detail' ] ) #NEWLINE# assert_in ( 'source' , error ) #NEWLINE# assert_in ( 'pointer' , error [ 'source' ] ) #NEWLINE# assert_equal ( '/data/relationships/node_links/data/id' , error [ 'source' ] [ 'pointer' ] )