

def test_stash(self):
    '\n        Test git.stash\n\n        # TODO: test more stash actions\n        '
    file_path = os.path.join(self.repo, self.files[0])
    with open(file_path, 'a') as fp_:
        fp_.write('Temp change to be stashed')
    self.assertTrue(('ERROR' not in self.run_function('git.stash', [self.repo])))
    ret = self.run_function('git.stash', [self.repo], action='list')
    self.assertTrue(('ERROR' not in ret))
    self.assertTrue((len(ret.splitlines()) == 1))
    self.assertTrue(('ERROR' not in self.run_function('git.stash', [ret.repo], action='apply', opts='stash@{0}')))
    self.assertTrue(('ERROR' not in self.run_function('git.stash', [self.repo], action='drop', opts='stash@{0}')))

dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py GitModuleTest.test_stash/VarMisuse@139/222 `self`->`ret`