def setUp(self): """ Create an in-memory L{Store} with a L{SecureShellConfiguration} in it. """ self.store = Store() self.shell = SecureShellConfiguration(store=self.store, hostKey=self._hostKey) installOn(self.shell, self.store)
def test_keyGeneration(self): """ L{SecureShellConfiguration} generates its own key pair if one is not supplied to C{__init__}. """ store = Store() shell = SecureShellConfiguration(store=store) installOn(shell, store) factory = shell.getFactory() self.assertHostKey(shell, factory)