def test_git_require_sudo_user(gituser):

    from fabtools.require.git import working_copy

    username, groupname = gituser

    with cd('/tmp'):
        try:
            working_copy(REMOTE_URL, path='wc_nobody', use_sudo=True, user=username)

            assert is_dir('wc_nobody')
            assert is_dir('wc_nobody/.git')

            with cd('wc_nobody'):
                remotes = sudo('git remote -v', user=username)
                assert remotes == \
                    'origin\thttps://github.com/disko/fabtools.git (fetch)\r\n' \
                    'origin\thttps://github.com/disko/fabtools.git (push)'

                assert _current_branch() == 'master'

            assert owner('wc_nobody') == username
            assert group('wc_nobody') == groupname

        finally:
            run_as_root('rm -rf wc_nobody')
aDict.nestedFunc in dict lookup in a loop - without autocalling
dataset/ETHPy150Open ronnix/fabtools/fabtools/tests/functional_tests/test_git.py/test_git_require_sudo_user--crossover with--dataset/ETHPy150Open skyostil/tracy/src/generator/Cheetah/Tests/NameMapper.py/VFN.test38