r46961 - fix up tests

hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Wed, 9 Mar 2016 02:45:52 -0700 (MST)
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: hawkowl
Date: Wed Mar  9 02:45:49 2016
New Revision: 46961

Modified:
   branches/manhole-hardcodedkey-8229/twisted/conch/ssh/keys.py

Log:
fix up tests

Modified: branches/manhole-hardcodedkey-8229/twisted/conch/ssh/keys.py
==============================================================================
--- branches/manhole-hardcodedkey-8229/twisted/conch/ssh/keys.py	(original)
+++ branches/manhole-hardcodedkey-8229/twisted/conch/ssh/keys.py	Wed Mar  9 02:45:49 2016
@@ -11,7 +11,6 @@
 import base64
 import itertools
 import warnings
-import appdirs
 
 from hashlib import md5
 
@@ -1233,7 +1232,7 @@
 
 
 def _getPersistentRSAKey(directory=None, filename=None, keySize=4096,
-                         _appdirs=appdirs):
+                         _appdirs=None):
     """
     This function returns a persistent L{Key}.
 
@@ -1253,6 +1252,9 @@
     @returns: A persistent key.
     @rtype: L{Key}
     """
+    if _appdirs is None:
+        import appdirs as _appdirs
+
     if filename is None:
         filename = "server.pem"