

def test_status(self):
    '\n        Test git.status\n        '
    changes = {
        'modified': ['foo'],
        'new': ['thisisdefinitelyanewfile'],
        'deleted': ['bar'],
        'untracked': ['thisisalsoanewfile'],
    }
    for filename in changes['modified']:
        with open(os.path.join(self.repo, filename), 'a') as fp_:
            fp_.write('Added a line\n')
    for filename in changes['new']:
        with open(os.path.join(self.repo, filename), 'w') as fp_:
            fp_.write((('This is a new file named ' + filename) + '.'))
        self.assertTrue(('ERROR' not in self.run_function('git.add', [self.repo, filename])))
    for filename in changes['deleted']:
        self.run_function('git.rm', [self.repo, filename])
    for filename in changes['untracked']:
        with open(os.path.join(self.repo, filename), 'w') as fp_:
            fp_.write((('This is a new file named ' + filename) + '.'))
    self.assertEqual(self.run_function('git.status', [self.repo]), self)

dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py GitModuleTest.test_status/VarMisuse@256/381 `changes`->`self`