X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Ftests%2Funit%2Fbenchmark%2Fcontexts%2Ftest_base.py;h=5fd7352f5f7e80589689b2e6fe782c3de847904f;hb=2809cb6adfbfe5e87cf78eb562149f37498477e0;hp=8f1cbcc557a098295c0c1ff9e9264d0f90c44bc1;hpb=145b9b8e3b109f08ae2cfee6d0a81956ebd91860;p=yardstick.git diff --git a/yardstick/tests/unit/benchmark/contexts/test_base.py b/yardstick/tests/unit/benchmark/contexts/test_base.py index 8f1cbcc55..5fd7352f5 100644 --- a/yardstick/tests/unit/benchmark/contexts/test_base.py +++ b/yardstick/tests/unit/benchmark/contexts/test_base.py @@ -19,12 +19,15 @@ import mock from yardstick.benchmark.contexts import base from yardstick.benchmark.contexts.base import Context +from yardstick.common import yaml_loader from yardstick.tests.unit import base as ut_base from yardstick.common.constants import YARDSTICK_ROOT_PATH class DummyContextClass(Context): + __context_type__ = "Dummy" + def __init__(self, host_name_separator='.'): super(DummyContextClass, self).__init__\ (host_name_separator=host_name_separator) @@ -129,7 +132,7 @@ class ContextTestCase(ut_base.BaseUnitTestCase): mock_get_ctx.assert_called_once() self.assertIsNone(result) - @mock.patch('yardstick.common.utils.read_yaml_file') + @mock.patch.object(yaml_loader, 'read_yaml_file') def test_read_pod_file(self, mock_read_yaml_file): attrs = {'name': 'foo', 'task_id': '12345678',