#NEWLINE# def test_filter_ipv4_egress_tcp_prefix( self ) : #NEWLINE# #INDENT# proto = 'tcp' #NEWLINE# priority = PROTOCOLS_LEARN_ACTION_PRIO [ proto ] #NEWLINE# prefix = FAKE_PREFIX [ constants . IPv4 ] #NEWLINE# rule = { #NEWLINE# #INDENT# 'ethertype' : constants . IPv4 , #NEWLINE# 'direction' : 'egress' , #NEWLINE# 'protocol' : proto , #NEWLINE# 'dest_ip_prefix' : prefix , #NEWLINE# #UNINDENT# } #NEWLINE# flow_call_list = [ mock . call ( actions = self . _learn_egress_actions ( proto , rule [ 'ethertype' ] , priority ) , dl_src = self . fake_port_1 [ 'mac_address' ] , nw_dst = prefix , nw_src = FAKE_IP [ constants . IPv4 ] , priority = 30 , proto = PROTOCOLS_STR [ constants . IPv4 ] [ proto ] , table = OF_EGRESS_TABLE ) ] #NEWLINE# self . _test_rules ( [ rule ] , FAKE_SGID , flow_call_list )