X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Funit%2Fnetwork_services%2Ftraffic_profile%2Ftest_fixed.py;h=eb182a2fb32efbfc161df98b9b176d48b2cbab77;hb=1b9cc8a38a4866797bd49d006e22607b348f42ac;hp=f4500dd38dfdabb5684965c66a2305a7502df086;hpb=6871f03787d1161d086434d929f4dec6b352c265;p=yardstick.git diff --git a/tests/unit/network_services/traffic_profile/test_fixed.py b/tests/unit/network_services/traffic_profile/test_fixed.py index f4500dd38..eb182a2fb 100644 --- a/tests/unit/network_services/traffic_profile/test_fixed.py +++ b/tests/unit/network_services/traffic_profile/test_fixed.py @@ -16,11 +16,19 @@ # from __future__ import absolute_import + import unittest import mock -from yardstick.network_services.traffic_profile.base import TrafficProfile -from yardstick.network_services.traffic_profile.fixed import FixedProfile +from tests.unit import STL_MOCKS + +STLClient = mock.MagicMock() +stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) +stl_patch.start() + +if stl_patch: + from yardstick.network_services.traffic_profile.base import TrafficProfile + from yardstick.network_services.traffic_profile.fixed import FixedProfile class TestFixedProfile(unittest.TestCase): @@ -66,7 +74,7 @@ class TestFixedProfile(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01'}, @@ -78,7 +86,7 @@ class TestFixedProfile(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02'},