diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-05 08:00:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-07-05 08:00:09 +0000 |
commit | 43eb5e0b4a03278b12c002ff5a5d1c6f58da35d6 (patch) | |
tree | 0a86f413b1b679076323350512ad0bcc138a0245 /yardstick/tests/unit/benchmark/contexts/test_node.py | |
parent | a7c1d2a9ea76951dbf9ec5e14fa9413156232f4a (diff) | |
parent | 4bf3b18f921b7bc7ecf3d34cb74fd80176cae8d5 (diff) |
Merge "Move "read_yaml_file" to common.yaml_loader"
Diffstat (limited to 'yardstick/tests/unit/benchmark/contexts/test_node.py')
-rw-r--r-- | yardstick/tests/unit/benchmark/contexts/test_node.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yardstick/tests/unit/benchmark/contexts/test_node.py b/yardstick/tests/unit/benchmark/contexts/test_node.py index 7fd13a406..da16074d9 100644 --- a/yardstick/tests/unit/benchmark/contexts/test_node.py +++ b/yardstick/tests/unit/benchmark/contexts/test_node.py @@ -8,14 +8,16 @@ ############################################################################## import os -import unittest import errno + import mock +import unittest -from yardstick.common import constants as consts from yardstick.benchmark.contexts import base from yardstick.benchmark.contexts import node +from yardstick.common import constants as consts from yardstick.common import exceptions +from yardstick.common import yaml_loader class NodeContextTestCase(unittest.TestCase): @@ -56,7 +58,7 @@ class NodeContextTestCase(unittest.TestCase): self.assertEqual(self.test_context.env, {}) self.assertEqual(self.test_context.attrs, {}) - @mock.patch('yardstick.common.utils.read_yaml_file') + @mock.patch.object(yaml_loader, 'read_yaml_file') @mock.patch('{}.os.path.join'.format(PREFIX)) def test_init_negative(self, mock_path_join, read_mock): special_path = '/foo/bar/error_file' |