#NEWLINE# def test_search_extended( self ) : #NEWLINE# #INDENT# self . create_graph_data ( ) #NEWLINE# X = self . g . v . x #NEWLINE# Y = self . g . v . y #NEWLINE# Z = self . g . v . z #NEWLINE# result = self . g . search ( ( result , 'likes' , Y ) , ( Y , 'is' , 'cat' ) , ( Z , 'likes' , Y ) ) #NEWLINE# self . assertEqual ( result [ 'x' ] , set ( [ 'charlie' , 'connor' ] ) ) #NEWLINE# self . assertEqual ( result [ 'y' ] , set ( [ 'huey' , 'zaizee' ] ) ) #NEWLINE# self . assertEqual ( result [ 'z' ] , set ( [ 'charlie' , 'connor' ] ) ) #NEWLINE# self . g . store_many ( ( ( 'charlie' , 'likes' , 'connor' ) , ( 'connor' , 'likes' , 'charlie' ) , ( 'connor' , 'is' , 'baby' ) , ( 'connor' , 'is' , 'human' ) , ( 'nash' , 'is' , 'baby' ) , ( 'nash' , 'is' , 'human' ) , ( 'connor' , 'lives' , 'ks' ) , ( 'nash' , 'lives' , 'nv' ) , ( 'charlie' , 'lives' , 'ks' ) ) ) #NEWLINE# result = self . g . search ( ( 'charlie' , 'likes' , X ) , ( X , 'is' , 'baby' ) , ( X , 'lives' , 'ks' ) ) #NEWLINE# self . assertEqual ( result , { #NEWLINE# #INDENT# 'x' : set ( [ 'connor' ] ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# result = self . g . search ( ( X , 'is' , 'baby' ) , ( X , 'likes' , Y ) , ( Y , 'lives' , 'ks' ) ) #NEWLINE# self . assertEqual ( result , { #NEWLINE# #INDENT# 'x' : set ( [ 'connor' ] ) , #NEWLINE# 'y' : set ( [ 'charlie' ] ) , #NEWLINE# #UNINDENT# } )