import os
import shutil
import tempfile
+import time
from xml.dom.minidom import Document
import mock
instancename = FakeCIMInstanceName()
self.stubs.Set(EMCSMISCommon, '_getinstancename',
instancename.fake_getinstancename)
+ self.stubs.Set(time, 'sleep',
+ self.fake_sleep)
driver = EMCSMISISCSIDriver(configuration=configuration)
driver.db = FakeDB()
self.driver = driver
output.append(item2)
return output
+ def fake_sleep(self, seconds):
+ return
+
def test_get_volume_stats(self):
self.driver.get_volume_stats(True)
instancename = FakeCIMInstanceName()
self.stubs.Set(EMCSMISCommon, '_getinstancename',
instancename.fake_getinstancename)
+ self.stubs.Set(time, 'sleep',
+ self.fake_sleep)
driver = EMCSMISFCDriver(configuration=configuration)
driver.db = FakeDB()
self.driver = driver
conn = FakeEcomConnection()
return conn
+ def fake_sleep(self, seconds):
+ return
+
def test_get_volume_stats(self):
self.driver.get_volume_stats(True)