def test_get_vif_name(self, m_get_veth_pair_names): vif_name = mock.sentinel.vif_name port = fake.get_port_obj(port_id=str(uuid.uuid4())) m_get_veth_pair_names.return_value = (vif_name, mock.sentinel.any) self.assertEqual(vif_name, ovu._get_vif_name(port)) m_get_veth_pair_names.assert_called_once_with(port.id)
def test_get_vif_name(self, m_get_veth_pair_names): port_id = mock.sentinel.port_id vif_name = mock.sentinel.vif_name port = {'id': port_id} m_get_veth_pair_names.return_value = (vif_name, mock.sentinel.any) self.assertEqual(vif_name, ovu._get_vif_name(port)) m_get_veth_pair_names.assert_called_once_with(port_id)