Tests: Mock out compute class for NfsDriverDoSetupTestCase
Tests in here can fail on assertions about os.path.exists
because novaclient is loaded by default as the compute API
class, and it calls os.path.exists.
novaclient isn't necessary here, so mock out compute_api_class
to prevent these random failures.
@@ -1452,6 +1452,7 @@ class NfsDriverDoSetupTestCase(test.TestCase):
super(NfsDriverDoSetupTestCase, self).setUp()
self.context = mock.Mock()
self.create_configuration()
+ self.override_config('compute_api_class', 'mock.Mock')
def create_configuration(self):
config = conf.Configuration(None)
