def test_deploy_roles(self, mock_process, mock_deploy): args = mock.Mock() args.role = ['foo-compute.yaml'] mock_process.return_value = ('env-foo-compute.yaml', 'compute') deploy._deploy_roles('foo', args, 'foo.yaml') mock_process.assert_called_once_with('foo-compute.yaml', 'foo.yaml', 'foo', args) mock_deploy.assert_called_once_with('foo-compute', 'templates/virtual-baremetal.yaml', 'env-foo-compute.yaml', poll=True)
def test_deploy_roles_empty(self, mock_process): args = mock.Mock() args.role = [] deploy._deploy_roles('foo', args, 'foo.yaml') mock_process.assert_not_called()