MockSSH
MockSSH copied to clipboard
Implement unit tests
We need unit tests.
For starters here are a some unit tests that are also using SSH:
- https://github.com/simon-engledew/sshim/tree/master/tests
- https://github.com/fabric/fabric/blob/master/tests/server.py
- https://sourcegraph.com/github.com/softlayer/swftp/tree/master/swftp%2Ftest%2Ffunctional%2Ftest_sftp.py
Added an example unit test, it depends on running the example mock_cisco.py manually.
https://github.com/ncouture/MockSSH/tree/master/tests/test_mock_cisco.py
My PR https://github.com/ncouture/MockSSH/pull/8 resolve dependencies over running server manually.
The threadedServer implemented by claudyus is a good way to perform end to end tests for one MockSSH server however only one twisted reactor can run at a time and reactors cannot be restarted.
Test failure by uncommenting the tearDownClass classmethod in https://github.com/ncouture/MockSSH/blob/master/tests/test_mock_F5.py and running the unit tests.
- https://twistedmatrix.com/documents/current/core/howto/trial.html