Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PuttyMachine file upload and download using non-default port #370

Merged
merged 7 commits into from
Jan 24, 2018

Conversation

kelbyers
Copy link
Contributor

This is a fix for issue #369. If a PuttyMachine instance is created to an ssh server that is running on the non-default port, then the upload and download methods fail, because pscp is still using the default port instead of the actual port.

I have added some tests. The tests verify:

  • PuttyMachine calls the __init__ of SshMachine with the correct parameters
  • PuttyMachine includes the correct port option for pscp with non-default ports
  • PuttyMachine.__str__ has the expected message.

The tests can run on any system even without Putty installed. One of the test fails on PyPy, but it is marked with @xfail_on_pypy. It fails on PyPy because the feature of pytest-mock used in that test does not work on PyPy.

@kelbyers kelbyers changed the title Support PuttyMachine file update and download using non-default port Support PuttyMachine file upload and download using non-default port Jan 13, 2018
@coveralls
Copy link

coveralls commented Jan 14, 2018

Coverage Status

Coverage increased (+0.3%) to 81.554% when pulling cfea104 on kelbyers:master into 4ea9e4c on tomerfiliba:master.

@henryiii
Copy link
Collaborator

I'll be getting back to pull requests in a few days; I've been relocating from US to France and still don't have internet access at home.

@henryiii
Copy link
Collaborator

Looks great! Thanks

@henryiii henryiii merged commit 7b4b71a into tomerfiliba:master Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants