Unit test fails in pbuilder environment
When running tests inside a pbuilder environment we don't have /dev/disk/by-path directory and so the test_host_driver test fails. Fix test by overriding the isdir method to return True and pretend that the directory is there. Change-Id: Ifd39d796b7f250b1ec45227a4262ebb33d5656bf
This commit is contained in:
parent
91d388b384
commit
ea51db5969
@ -105,6 +105,7 @@ class HostDriverTestCase(test.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(HostDriverTestCase, self).setUp()
|
||||
self.stubs.Set(os.path, 'isdir', lambda x: True)
|
||||
self.devlist = ['device1', 'device2']
|
||||
self.stubs.Set(os, 'listdir', lambda x: self.devlist)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user