Fuel Client unit tests fail on OS X - fixed
the platform specific method os.path.realpath is mocked. Closes-Bug: #1494196 Change-Id: I8e11b7fc946b711a83aae1776a749fe6180de377
This commit is contained in:
committed by
Bulat Gaifullin
parent
0e025d9fa7
commit
6b26865728
@@ -100,11 +100,12 @@ class TestSyncDeploymentTasks(base.UnitTestCase):
|
||||
self.assertEqual(
|
||||
json.loads(kwargs['data']), API_INPUT)
|
||||
|
||||
def test_sync_with_directory_path(self, mfiles, mopen, mrequests):
|
||||
@patch('fuelclient.cli.actions.release.os')
|
||||
def test_sync_with_directory_path(self, mos, mfiles, mopen, mrequests):
|
||||
mrequests.get().json.return_value = RELEASE_OUTPUT
|
||||
mfiles.return_value = ['/etc/puppet/2014.2-6.0/tasks.yaml']
|
||||
mos.path.realpath.return_value = real_path = '/etc/puppet'
|
||||
mfiles.return_value = [real_path + '/2014.2-6.0/tasks.yaml']
|
||||
mopen().__enter__().read.return_value = API_OUTPUT
|
||||
real_path = '/etc/puppet'
|
||||
self.execute(
|
||||
['fuel', 'rel', '--sync-deployment-tasks', '--dir', real_path])
|
||||
mfiles.assert_called_once_with(real_path, '*tasks.yaml')
|
||||
|
||||
Reference in New Issue
Block a user