@@ -906,7 +906,9 @@ def _verify_lb(test, protocol, vip_ext_port, vip_int_port):
906906 pf_def .INTERNAL_IP_ADDRESS : p1_ip }
907907 pf_obj = self .pf_plugin .create_floatingip_port_forwarding (
908908 self .context , fip_id , ** fip_attrs (fip_pf_args ))
909- m_publish .assert_called_once ()
909+ call = mock .call ('port_forwarding' , 'after_create' , self .pf_plugin ,
910+ payload = mock .ANY )
911+ m_publish .assert_has_calls ([call ])
910912
911913 # Assert load balancer for port forwarding was not created
912914 self .assertFalse (self ._find_pf_lb (router_id , fip_id ))
@@ -924,7 +926,9 @@ def _verify_lb(test, protocol, vip_ext_port, vip_int_port):
924926 m_publish .reset_mock ()
925927 self .pf_plugin .update_floatingip_port_forwarding (
926928 self .context , pf_obj ['id' ], fip_id , ** fip_attrs (fip_pf_args ))
927- m_publish .assert_called_once ()
929+ call = mock .call ('port_forwarding' , 'after_update' , self .pf_plugin ,
930+ payload = mock .ANY )
931+ m_publish .assert_has_calls ([call ])
928932
929933 # Assert load balancer for port forwarding is stale
930934 _verify_lb (self , 'tcp' , 2222 , 22 )
0 commit comments