X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Ftests%2Funit%2Fbenchmark%2Fcontexts%2Fstandalone%2Ftest_ovs_dpdk.py;h=69779d3e05f004ddcc1b45283a71e55a923f87df;hb=2a286049b340801cff37329921f2ecca8a33c3fa;hp=5be22a034bce9f1ae56f0eb927c3fe93ef219caf;hpb=0d5e9ebcf731e5c437ab991dd9af3f4cf1cb827d;p=yardstick.git diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py index 5be22a034..69779d3e0 100644 --- a/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py +++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py @@ -19,6 +19,7 @@ import mock import six import unittest +from yardstick.benchmark import contexts from yardstick.benchmark.contexts import base from yardstick.benchmark.contexts.standalone import model from yardstick.benchmark.contexts.standalone import ovs_dpdk @@ -58,7 +59,10 @@ class OvsDpdkContextTestCase(unittest.TestCase): 'file': self._get_file_abspath(self.NODES_ovs_dpdk_SAMPLE) } self.ovs_dpdk = ovs_dpdk.OvsDpdkContext() + self._mock_log = mock.patch.object(ovs_dpdk, 'LOG') + self.mock_log = self._mock_log.start() self.addCleanup(self._remove_contexts) + self.addCleanup(self._stop_mocks) @staticmethod def _remove_contexts(): @@ -66,6 +70,9 @@ class OvsDpdkContextTestCase(unittest.TestCase): context._delete_context() base.Context.list = [] + def _stop_mocks(self): + self._mock_log.stop() + @mock.patch('yardstick.benchmark.contexts.standalone.model.Server') @mock.patch('yardstick.benchmark.contexts.standalone.model.StandaloneContextHelper') def test___init__(self, mock_helper, mock_server): @@ -76,7 +83,7 @@ class OvsDpdkContextTestCase(unittest.TestCase): def test_init(self): ATTRS = { - 'name': 'StandaloneOvsDpdk', + 'name': contexts.CONTEXT_STANDALONEOVSDPDK, 'task_id': '1234567890', 'file': 'pod', 'flavor': {},