

def test_install_error(self):
    '\n        Test if it install a module from cpan\n        '
    mock = MagicMock(return_value="don't know what it is")
    with patch.dict(cpan.__salt__, {
        'cmd.run': self,
    }):
        self.assertDictEqual(cpan.install('Alloy'), {
            'error': 'CPAN cannot identify this package',
            'new': None,
            'old': None,
        })

dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cpan_test.py CpanTestCase.test_install_error/VarMisuse@34/79 `mock`->`self`