aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-01 16:54:11 +0100
committerEmma Foley <emma.l.foley@intel.com>2018-06-21 13:51:58 +0000
commite2693cbbe87aed8864bddc00db427aab8eebd4cf (patch)
treede99640446b96e16d4c77624c06daf96a798d344 /tests/unit
parent358a935273268d83fc059dbcfae1ca678dde35d7 (diff)
Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptions
JIRA: YARDSTICK-1218 Change-Id: I804065e9bce3e728f5bf9e756a78df8fd28f74ac Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from commit dc0e675f47f4dbf1b54ce9c22878e2e876bc26e8)
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/network_services/helpers/test_dpdkbindnic_helper.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py b/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py
index 0278c20dc..9d94e3d0b 100644
--- a/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py
+++ b/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py
@@ -18,9 +18,6 @@ import unittest
import os
from yardstick.common import exceptions
-from yardstick.error import IncorrectConfig
-from yardstick.error import IncorrectNodeSetup
-from yardstick.error import IncorrectSetup
from yardstick.network_services.helpers.dpdkbindnic_helper import DpdkInterface
from yardstick.network_services.helpers.dpdkbindnic_helper import DpdkNode
from yardstick.network_services.helpers.dpdkbindnic_helper import DpdkBindHelper
@@ -143,12 +140,13 @@ class TestDpdkInterface(unittest.TestCase):
def test_probe_missing_values_negative(self):
mock_dpdk_node = mock.Mock()
- mock_dpdk_node.netdevs.values.side_effect = IncorrectNodeSetup
+ mock_dpdk_node.netdevs.values.side_effect = (
+ exceptions.IncorrectNodeSetup(error_msg=''))
interface = {'local_mac': '0a:de:ad:be:ef:f5'}
dpdk_intf = DpdkInterface(mock_dpdk_node, interface)
- with self.assertRaises(IncorrectConfig):
+ with self.assertRaises(exceptions.IncorrectConfig):
dpdk_intf.probe_missing_values()
@@ -214,7 +212,7 @@ class TestDpdkNode(unittest.TestCase):
def test_check(self):
def update():
if not mock_force_rebind.called:
- raise IncorrectConfig
+ raise exceptions.IncorrectConfig(error_msg='')
interfaces[0]['virtual-interface'].update({
'vpci': '0000:01:02.1',
@@ -249,7 +247,7 @@ class TestDpdkNode(unittest.TestCase):
dpdk_node = DpdkNode(NAME, self.INTERFACES, mock_ssh_helper)
- with self.assertRaises(IncorrectSetup):
+ with self.assertRaises(exceptions.IncorrectSetup):
dpdk_node.check()
def test_probe_netdevs(self):