diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-22 19:04:57 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-22 19:04:57 +0100 |
commit | 4df4159413a4bf30a891f21cd69202e8746c8fea (patch) | |
tree | e44615e5382204ad60ba2eaa9e90b6021b270a2a /git/test/test_git.py | |
parent | f3d91ca75500285d19c6ae2d4bf018452ad822a6 (diff) | |
download | gitpython-4df4159413a4bf30a891f21cd69202e8746c8fea.tar.gz |
Removed Git.sshkey() as it couldn't be distributed properly.0.3.6
However, I kept information on how to achieve the same thing with
`custom_environment()` in the test.
Related to #234
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 18acd77e..8087bc45 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -181,23 +181,17 @@ class TestGit(TestBase): assert new_env == {'VARKEY': 'VARVALUE'} assert self.git.environment() == {} - class TestRepo(Repo): - class GitCommandWrapperType(Git): - def _sshkey_script_path(self): - path = os.path.join(rw_dir, 'failing-script.sh') - stream = open(path, 'wt') - stream.write("#!/usr/bin/env sh\n" + - "echo FOO\n") - stream.close() - os.chmod(path, 0o555) - return path - # end Git - # end Repo - - rw_repo = TestRepo.init(os.path.join(rw_dir, 'repo')) + path = os.path.join(rw_dir, 'failing-script.sh') + stream = open(path, 'wt') + stream.write("#!/usr/bin/env sh\n" + + "echo FOO\n") + stream.close() + os.chmod(path, 0o555) + + rw_repo = Repo.init(os.path.join(rw_dir, 'repo')) remote = rw_repo.create_remote('ssh-origin', "ssh://git@server/foo") - with rw_repo.git.sshkey('doesntexist.key'): + with rw_repo.git.custom_environment(GIT_SSH=path): try: remote.fetch() except GitCommandError as err: |