def setUp(self):
    super(TestDriverMixin, self).setUp()
    self.instance_info = osv_objects.instance_info.InstanceInfo(uuid=uuid.uuid4(), name='foo')
    self.ifname = 'c_interface'
    self.netns = '/proc/netns/1234'
    self.ipdbs = {}
    self.m_bridge_iface = mock.Mock(__exit__=mock.Mock(return_value=None))
    self.m_c_iface = mock.Mock()
    self.m_h_iface = mock.Mock()
    (self.h_ipdb, self.h_ipdb_exit) = self._mock_ipdb_context_manager(None)
    (self.c_ipdb, self.c_ipdb_exit) = self._mock_ipdb_context_manager(self.netns)
    self.m_create = mock.Mock()
    self.h_ipdb.create = mock.Mock(return_value=mock.Mock(__enter__=mock.Mock(return_value=self.m_create), __exit__=mock.Mock(return_value=None)))
    self.c_ipdb.create = mock.Mock(return_value=mock.Mock(__enter__=mock.Mock(return_value=self.m_create), __exit__=mock.Mock(return_value=None)))
def setUp(self):
    super(TestDriverMixin, self).setUp()
    self.instance_info = osv_objects.instance_info.InstanceInfo(uuid=uuid.uuid4(), name='foo')
    self.ifname = 'c_interface'
    self.netns = '/proc/netns/1234'
    self.ipdbs = {}
    self.m_bridge_iface = mock.Mock(__exit__=mock.Mock(return_value=None))
    self.m_c_iface = mock.Mock()
    self.m_h_iface = mock.Mock()
    (self.h_ipdb, self.h_ipdb_exit) = self._mock_ipdb_context_manager(None)
    (self.c_ipdb, self.c_ipdb_exit) = self._mock_ipdb_context_manager(self.netns)
    self.m_create = mock.Mock()
    self.h_ipdb.create = mock.Mock(return_value=mock.Mock(__enter__=mock.Mock(return_value=self.m_create), __exit__=mock.Mock(return_value=None)))
    self.c_ipdb.create = mock.Mock(return_value=mock.Mock(__enter__=mock.Mock(return_value=self.m_create), __exit__=mock.Mock(return_value=None)))