@patch('salt.modules.npm._check_valid_version',
           MagicMock(return_value=True))
    def test_cache_path(self):
        mock = MagicMock(return_value={'retcode': 1, 'stderr': 'error'})
        with patch.dict(npm.__salt__, {'cmd.run_all': mock}):
            self.assertEqual(npm.cache_path(), 'error')

        mock = MagicMock(return_value={'retcode': 0, 'stderr': 'error',
                                       'stdout': '/User/salt/.npm'})
        with patch.dict(npm.__salt__, {'cmd.run_all': mock}):
            self.assertEqual(npm.cache_path(), '/User/salt/.npm')
Create a journal object from the standard fatebook
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/npm_test.py/NpmTestCase.test_cache_path--crossover with--dataset/ETHPy150Open linkedin/simoorg/src/test/test_Journal.py/TestJournal.setUp