#NEWLINE# @ skipIf ( version_2_1 , 'this test highlights a server bug in 2.1' ) #NEWLINE# def test_path_creation_is_not_idempotent( self ) : #NEWLINE# #INDENT# alice = Node ( name = 'Alice' ) #NEWLINE# self . graph . create ( alice ) #NEWLINE# self . batch . create_path ( alice , 'KNOWS' , { #NEWLINE# #INDENT# 'name' : 'Bob' , #NEWLINE# #UNINDENT# } ) #NEWLINE# results = self . batch . run ( ) #NEWLINE# path = results [ 0 ] #NEWLINE# bob = path . nodes ( ) [ 1 ] #NEWLINE# assert ( path . nodes ( ) [ 0 ] == alice ) #NEWLINE# assert ( path [ 'name' ] == 'Bob' ) #NEWLINE# self . batch = WriteBatch ( self . graph ) #NEWLINE# self . batch . create_path ( alice , 'KNOWS' , { #NEWLINE# #INDENT# 'name' : 'Bob' , #NEWLINE# #UNINDENT# } ) #NEWLINE# results = self . batch . run ( ) #NEWLINE# path = results [ 0 ] #NEWLINE# assert ( path . nodes ( ) [ 0 ] == alice ) #NEWLINE# assert ( path . nodes ( ) [ 1 ] != bob )