def test_remove_noninstalled_error(self):
        mock = MagicMock(return_value={'installed version': None})
        with patch.object(cpan, 'show', mock):
            self.assertDictEqual(cpan.remove('Alloy'),
                                 {'new': None, 'old': None})
Test if it remove non installed module using cpan
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cpan_test.py/CpanTestCase.test_remove_noninstalled_error