#NEWLINE# @ mock . patch ( 'oppy.path.util.nodeUsableWithOther' , return_value = 'test val' ) #NEWLINE# def test_middleFilter( self , mock_nuwo ) : #NEWLINE# #INDENT# middle_fprint = 'middle fprint' #NEWLINE# rel_stat = mock . Mock ( ) #NEWLINE# rel_stat . flags = ( Flag . RUNNING , Flag . FAST , Flag . STABLE ) #NEWLINE# rel_stat . digest = 'middle digest' #NEWLINE# cons_rel_stats = { #NEWLINE# #INDENT# 'middle fprint' : rel_stat , #NEWLINE# #UNINDENT# } #NEWLINE# desc = mock . Mock ( ) #NEWLINE# desc . ntor_onion_key = 'ntor-onion-key' #NEWLINE# descriptors = { #NEWLINE# #INDENT# 'middle digest' : desc , #NEWLINE# #UNINDENT# } #NEWLINE# fast = True #NEWLINE# stable = True #NEWLINE# exit_desc = 'exit desc' #NEWLINE# exit_status_entry = 'exit se' #NEWLINE# guard_desc = 'guard desc' #NEWLINE# guard_status_entry = 'guard se' #NEWLINE# self . assertEqual ( path . middleFilter ( middle_fprint , cons_rel_stats , descriptors , exit_desc , exit_status_entry , guard_desc , guard_status_entry , fast , stable ) , 'test val' )