#NEWLINE# def test_can_create_relationship_with_new_nodes( self ) : #NEWLINE# #INDENT# self . batch . create ( { #NEWLINE# #INDENT# 'name' : 'Alice' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . batch . create ( { #NEWLINE# #INDENT# 'name' : 'Bob' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . batch . create ( ( 0 , 'KNOWS' , 1 ) ) #NEWLINE# ( alice , bob , knows ) = self . batch . run ( ) #NEWLINE# assert isinstance ( knows , Relationship ) #NEWLINE# assert ( knows . start_node ( ) == alice ) #NEWLINE# assert ( knows . type ( ) == 'KNOWS' ) #NEWLINE# assert ( knows . end_node ( ) == bob ) #NEWLINE# assert ( dict ( knows ) == { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . recycling = [ knows , alice , bob ]