

def test_remove_unexist_error(self):
    '\n        Test if it try to remove an unexist module using cpan\n        '
    mock = MagicMock(return_value="don't know what it is")
    with patch.dict(cpan.__salt__, {
        'cmd.run': mock,
    }):
        self.assertDictEqual(cpan.remove('Alloy'), {
            'error': 'This package does not seem to exist',
        })

dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cpan_test.py CpanTestCase.test_remove_unexist_error/original