def test_remove_unexist_error(self):
        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'})
Test if it try to remove an unexist module using cpan
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cpan_test.py/CpanTestCase.test_remove_unexist_error