Esempio n. 1
0
 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)
     )
Esempio n. 2
0
 def test_run_server_using_shell_factory(self):
     shell_factory = base.build_factory()
     listener = reactor.listenTCP(9998, shell_factory)
     listener.stopListening()
Esempio n. 3
0
    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)
Esempio n. 4
0
 def test_create_ssh_factory_portal(self):
     ssh_factory = base.build_factory()
     ssh_factory.portal = portal.Portal(StubShell.SSHRealm(self.EXECUTABLES))