Closed claudyus closed 9 years ago
This pull request implement a threaded versuion of MockSSH library.
This features is really valuable in project where unittest that are using ssh server to retrieve information and parse it. I also modify the tests that show this in practice.
Here an example:
class MyTestCase(unittest.TestCase): @classmethod def setUpClass(cls): users = {'testadmin': 'x'} MockSSH.threadedServer(commands, prompt="$", interface="localhost", port=9999, **users) @classmethod def tearDownClass(cls): print "tearDownClass" MockSSH.threadedServerStop()
I will be reviewing your pull request shortly.
This is a much needed effort for unit testing using MockSSH.
Thanks claudyus!
This pull request implement a threaded versuion of MockSSH library.
This features is really valuable in project where unittest that are using ssh server to retrieve information and parse it. I also modify the tests that show this in practice.
Here an example: