def test_install_feature_failure(self):
        expected = {
            'comment': "Feat1 was unable to be installed. Failed\n",
            'changes': {},
            'name': 'Feat1',
            'result': False
        }

        installed_mock = MagicMock(return_value=["Feat3"])
        install_mock = MagicMock(return_value={'retcode': 67, 'stdout': 'Failed'})
        with patch.dict(dism.__salt__, {'dism.installed_features': installed_mock,
                                        'dism.install_feature': install_mock}):
            out = dism.feature_installed('Feat1', 'somewhere', True)
            installed_mock.assert_called_once_with()
            install_mock.assert_called_once_with('Feat1', 'somewhere', True)
            self.assertEqual(out, expected)
Test installing a feature which fails with DISM
dataset/ETHPy150Open saltstack/salt/tests/unit/states/win_dism_test.py/DISMTestCase.test_install_feature_failure