Merge "Fix os.path.join() for unittests under python 3.6"

This commit is contained in:
Zuul 2018-03-20 01:25:15 +00:00 committed by Gerrit Code Review
commit 370b4fa793
2 changed files with 4 additions and 2 deletions

View File

@ -796,7 +796,8 @@ class MongodbRestoreTests(trove_testtools.TestCase):
def setUp(self, _):
super(MongodbRestoreTests, self).setUp()
self.patch_ope = patch('os.path.expanduser')
self.patch_ope = patch('os.path.expanduser',
return_value='/tmp/mongo')
self.mock_ope = self.patch_ope.start()
self.addCleanup(self.patch_ope.stop)
self.restore_runner = utils.import_class(

View File

@ -34,7 +34,8 @@ class RedisGuestAgentManagerTest(DatastoreManagerTest):
@patch.object(ImportOverrideStrategy, '_initialize_import_directory')
def setUp(self, *args, **kwargs):
super(RedisGuestAgentManagerTest, self).setUp('redis')
self.patch_ope = patch('os.path.expanduser')
self.patch_ope = patch('os.path.expanduser',
return_value='/tmp/redis')
self.mock_ope = self.patch_ope.start()
self.addCleanup(self.patch_ope.stop)
self.replication_strategy = 'RedisSyncReplication'