#NEWLINE# def test_exitFilter_have_port( self ) : #NEWLINE# #INDENT# exit_fprint = 'exit_fprint' #NEWLINE# rel_stat = mock . Mock ( ) #NEWLINE# rel_stat . flags = ( Flag . RUNNING , Flag . VALID , Flag . STABLE , Flag . FAST ) #NEWLINE# rel_stat . digest = 'exit_digest' #NEWLINE# desc = mock . Mock ( ) #NEWLINE# desc . ntor_onion_key = 'ntor-key' #NEWLINE# desc . exit_policy = mock . Mock ( ) #NEWLINE# desc . exit_policy . can_exit_to = mock . Mock ( ) #NEWLINE# desc . exit_policy . can_exit_to . return_value = 'test retval' #NEWLINE# desc . exit_policy . is_exiting_allowed = False #NEWLINE# cons_rel_stats = { #NEWLINE# #INDENT# 'exit_fprint' : port , #NEWLINE# #UNINDENT# } #NEWLINE# descriptors = { #NEWLINE# #INDENT# 'exit_digest' : desc , #NEWLINE# #UNINDENT# } #NEWLINE# fast = True #NEWLINE# stable = True #NEWLINE# internal = False #NEWLINE# port = 0 #NEWLINE# self . assertEqual ( path . exitFilter ( exit_fprint , cons_rel_stats , descriptors , fast , stable , internal , port ) , 'test retval' )