aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/contexts/test_standalone.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-21 23:49:42 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-21 23:49:42 +0000
commit4de16cbc3c7a4e03542c6256f3aeda79dbf49b62 (patch)
tree386e3cab430cdb35d383b01ba3768566b515e5b9 /tests/unit/benchmark/contexts/test_standalone.py
parent5d35ee70c26bb5d3a4ce150b874982966360db11 (diff)
parentb9bd7a7b582dff2a8186c58a1fc9de4a219fcb1f (diff)
Merge "Refactor to make file sys more like class inheritance"
Diffstat (limited to 'tests/unit/benchmark/contexts/test_standalone.py')
-rw-r--r--tests/unit/benchmark/contexts/test_standalone.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/unit/benchmark/contexts/test_standalone.py b/tests/unit/benchmark/contexts/test_standalone.py
index d13e28470..b1402a1c9 100644
--- a/tests/unit/benchmark/contexts/test_standalone.py
+++ b/tests/unit/benchmark/contexts/test_standalone.py
@@ -18,25 +18,26 @@
# Unittest for yardstick.benchmark.contexts.standalone
from __future__ import absolute_import
+
import os
import unittest
+
import mock
from yardstick.benchmark.contexts import standalone
-from yardstick.benchmark.contexts import sriov
-from yardstick.benchmark.contexts import ovsdpdk
+from yardstick.benchmark.contexts.standalone import ovsdpdk, sriov
MOCKS = {
'yardstick.benchmark.contexts': mock.MagicMock(),
- 'yardstick.benchmark.contexts.sriov': mock.MagicMock(),
- 'yardstick.benchmark.contexts.ovsdpdk': mock.MagicMock(),
+ 'yardstick.benchmark.contexts.standalone.sriov': mock.MagicMock(),
+ 'yardstick.benchmark.contexts.standalone.ovsdpdk': mock.MagicMock(),
'yardstick.benchmark.contexts.standalone': mock.MagicMock(),
}
-@mock.patch('yardstick.benchmark.contexts.ovsdpdk.time')
+@mock.patch('yardstick.benchmark.contexts.standalone.ovsdpdk.time')
@mock.patch('yardstick.benchmark.contexts.standalone.time')
-@mock.patch('yardstick.benchmark.contexts.sriov.time')
+@mock.patch('yardstick.benchmark.contexts.standalone.sriov.time')
class StandaloneContextTestCase(unittest.TestCase):
NODES_SAMPLE = "nodes_sample_new.yaml"
NODES_SAMPLE_SRIOV = "nodes_sample_new_sriov.yaml"
@@ -564,7 +565,7 @@ class StandaloneContextTestCase(unittest.TestCase):
self.assertIsNone(self.test_context.undeploy())
def test_get_nfvi_obj_sriov(self, mock_sriov_time, mock_standlalone_time, mock_ovsdpdk_time):
- with mock.patch('yardstick.benchmark.contexts.sriov'):
+ with mock.patch('yardstick.benchmark.contexts.standalone.sriov'):
attrs = {
'name': 'sriov',
'file': self._get_file_abspath(self.NODES_SAMPLE)
@@ -589,7 +590,7 @@ class StandaloneContextTestCase(unittest.TestCase):
self.assertIsNotNone(self.test_context.get_nfvi_obj())
def test_get_nfvi_obj_ovs(self, mock_sriov_time, mock_standlalone_time, mock_ovsdpdk_time):
- with mock.patch('yardstick.benchmark.contexts.ovsdpdk'):
+ with mock.patch('yardstick.benchmark.contexts.standalone.ovsdpdk'):
attrs = {
'name': 'ovs',
'file': self._get_file_abspath(self.NODES_SAMPLE_OVSDPDK)