def test_register_checkers(self): ssh_factory = base.build_factory() ssh_factory.portal = portal.Portal(StubShell.SSHRealm(self.EXECUTABLES)) users = {'usr':'******'} ssh_factory.portal.registerChecker( checkers.InMemoryUsernamePasswordDatabaseDontUse(**users) )
def test_run_server_using_shell_factory(self): shell_factory = base.build_factory() listener = reactor.listenTCP(9998, shell_factory) listener.stopListening()
def test_get_shell_factory_returns_SSHFactory(self): from twisted.conch.ssh import factory shell_factory = base.build_factory() self.assertIsInstance(shell_factory, factory.SSHFactory)
def test_create_ssh_factory_portal(self): ssh_factory = base.build_factory() ssh_factory.portal = portal.Portal(StubShell.SSHRealm(self.EXECUTABLES))