r46956 - fix the tests
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Wed, 9 Mar 2016 00:42:31 -0700 (MST)
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Wed Mar 9 00:42:27 2016
New Revision: 46956
Modified:
branches/manhole-hardcodedkey-8229/twisted/conch/test/test_recvline.py
Log:
fix the tests
Modified: branches/manhole-hardcodedkey-8229/twisted/conch/test/test_recvline.py
==============================================================================
--- branches/manhole-hardcodedkey-8229/twisted/conch/test/test_recvline.py (original)
+++ branches/manhole-hardcodedkey-8229/twisted/conch/test/test_recvline.py Wed Mar 9 00:42:27 2016
@@ -7,10 +7,12 @@
functionality.
"""
-import sys, os
+import os
+import sys
from twisted.conch.insults import insults
from twisted.conch import recvline
+from twisted.conch.ssh.keys import _getPersistentRSAKey
from twisted.python import reflect, components
from twisted.internet import defer, error
@@ -18,6 +20,7 @@
from twisted.cred import portal
from twisted.test.proto_helpers import StringTransport
+
class ArrowsTests(unittest.TestCase):
def setUp(self):
self.underlyingTransport = StringTransport()
@@ -467,6 +470,11 @@
rlm,
[checkers.InMemoryUsernamePasswordDatabaseDontUse(**{u: p})])
sshFactory = ConchFactory(ptl)
+
+ sshKey = _getPersistentRSAKey(self.mktemp(), keySize=512)
+ sshFactory.publicKeys["ssh-rsa"] = sshKey
+ sshFactory.privateKeys["ssh-rsa"] = sshKey
+
sshFactory.serverProtocol = self.serverProtocol
sshFactory.startFactory()