summaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/runner
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-02-13 17:17:22 +0000
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-02-28 13:36:39 +0000
commitb7513baa593bc9715abe652ef337c923619ead21 (patch)
tree3c750fb14bb59661af9ee1d74b790584c8af68cf /yardstick/tests/unit/benchmark/runner
parent3387e5618de37c37714c86cec9058d737cb01a5c (diff)
Mock TRex STL libraries globally
TRex Python libraries are not going to be available during unit testing execution. Those modules calling TRex libraries should be mocked individually. This patch will remove the need of mocking those libraries per module. JIRA: YARDSTICK-1010 Change-Id: I4aa11d43ecf32a3dad78f869541b4afea4ec1d28 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/runner')
-rw-r--r--yardstick/tests/unit/benchmark/runner/test_search.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/yardstick/tests/unit/benchmark/runner/test_search.py b/yardstick/tests/unit/benchmark/runner/test_search.py
index 1bc07448d..4e5b4fe77 100644
--- a/yardstick/tests/unit/benchmark/runner/test_search.py
+++ b/yardstick/tests/unit/benchmark/runner/test_search.py
@@ -17,15 +17,8 @@ import time
import mock
import unittest
-from yardstick.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.benchmark.runners.search import SearchRunner
- from yardstick.benchmark.runners.search import SearchRunnerHelper
+from yardstick.benchmark.runners.search import SearchRunner
+from yardstick.benchmark.runners.search import SearchRunnerHelper
class TestSearchRunnerHelper(unittest.TestCase):