@mock.patch('kuryr_kubernetes.cni.binding.base.get_ipdb')
@mock.patch('os_vif.plug')
def _test_connect(self, m_vif_plug, m_get_ipdb, report=None):

    def get_ipdb(netns=None):
        return self.ipdbs[netns]
    m_get_ipdb.side_effect = get_ipdb
    base.connect(self.vif, self.instance_info, self.ifname, self.netns, report)
    m_vif_plug.assert_called_once_with(self.vif, self.instance_info)
    self.m_c_iface.add_ip.assert_called_once_with('192.168.0.2/24')
    if report:
        report.assert_called_once()
@mock.patch('kuryr_kubernetes.cni.binding.base.get_ipdb')
@mock.patch('os_vif.plug')
def _test_connect(self, m_vif_plug, m_get_ipdb, report=None):

    def get_ipdb(netns=None):
        return self.ipdbs[netns]
    m_get_ipdb.side_effect = get_ipdb
    base.connect(self.vif, self.instance_info, self.ifname, self.netns, report)
    m_vif_plug.assert_called_once_with(self.vif, self.instance_info)
    self.m_c_iface.add_ip.assert_called_once_with('192.168.0.2/24')
    if report:
        report.assert_called_once()