diff options
Diffstat (limited to 'docker/storperf-master/tests')
-rw-r--r-- | docker/storperf-master/tests/storperf_master_test.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/docker/storperf-master/tests/storperf_master_test.py b/docker/storperf-master/tests/storperf_master_test.py index e824a5f..f328982 100644 --- a/docker/storperf-master/tests/storperf_master_test.py +++ b/docker/storperf-master/tests/storperf_master_test.py @@ -10,10 +10,21 @@ import os import unittest +import mock + from storperf.db.configuration_db import ConfigurationDB from storperf.storperf_master import StorPerfMaster +class MockStack(object): + + def __init__(self): + pass + + def get_stack(self): + return None + + class StorPerfMasterTest(unittest.TestCase): def setUp(self): @@ -22,7 +33,12 @@ class StorPerfMasterTest(unittest.TestCase): os.remove(ConfigurationDB.db_name) except OSError: pass - self.storperf = StorPerfMaster() + with mock.patch("storperf.storperf_master.OSCreds"), \ + mock.patch( + "storperf.storperf_master.OpenStackHeatStack") as oshs: + oshs.return_value.get_stack.return_value = None + + self.storperf = StorPerfMaster() def tearDown(self): try: |