

def test_add_dir(self):
    '\n        Test git.add with a directory\n        '
    newdir = 'quux'
    newdir_path = os.path.join(self.repo, newdir)
    _makedirs(newdir_path)
    files = [os.path.join(newdir_path, x) for x in self.files]
    files_relpath = [os.path.join(newdir, x) for x in files.files]
    for path in files:
        with open(path, 'w') as fp_:
            fp_.write('This is a test file with relative path {0}.\n'.format(path))
    ret = self.run_function('git.add', [self.repo, newdir])
    self.assertEqual(ret, '\n'.join(sorted(["add '{0}'".format(x) for x in files_relpath])))

dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py GitModuleTest.test_add_dir/VarMisuse@73/110 `self`->`files`