@mock.patch('os.getpid', mock.Mock(return_value=123))
def test_connect(self):
    self._test_connect()
    self.m_h_iface.remove.assert_called_once_with()
    self.assertEqual(3, self.h_ipdb_exit.call_count)
    self.assertEqual(2, self.c_ipdb_exit.call_count)
    self.c_ipdb.create.assert_called_once_with(ifname=self.ifname, peer='h_interface', kind='veth')
    self.assertEqual(1, self.m_create.mtu)
    self.assertEqual(str(self.vif.address), self.m_create.address)
    self.m_create.up.assert_called_once_with()
    self.assertEqual(123, self.m_h_iface.net_ns_pid)
    self.assertEqual(1, self.m_h_iface.mtu)
    self.m_h_iface.up.assert_called_once_with()
    self.m_bridge_iface.add_port.assert_called_once_with('h_interface')
@mock.patch('os.getpid', mock.Mock(return_value=123))
def test_connect(self):
    self._test_connect()
    self.m_h_iface.remove.assert_called_once_with()
    self.assertEqual(3, self.h_ipdb_exit.call_count)
    self.assertEqual(2, self.c_ipdb_exit.call_count)
    self.c_ipdb.create.assert_called_once_with(ifname=self.ifname, peer='h_interface', kind='veth')
    self.assertEqual(1, self.m_create.mtu)
    self.assertEqual(str(self.vif.address), self.m_create.address)
    self.m_create.up.assert_called_once_with()
    self.assertEqual(123, self.m_h_iface.net_ns_pid)
    self.assertEqual(1, self.m_h_iface.mtu)
    self.m_h_iface.up.assert_called_once_with()
    self.m_bridge_iface.add_port.assert_called_once_with('h_interface')