Explorar o código

Explicitly reenable paramiko server on Gentoo for tests

Gentoo patches out server support from paramiko for security reasons.
Since dulwich uses it only for testing, use the knob to explicitly
reenable it.
Michał Górny %!s(int64=2) %!d(string=hai) anos
pai
achega
07ac694d25
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      dulwich/contrib/test_paramiko_vendor.py

+ 6 - 0
dulwich/contrib/test_paramiko_vendor.py

@@ -122,6 +122,12 @@ class Server(paramiko.ServerInterface):
 class ParamikoSSHVendorTests(TestCase):
 
     def setUp(self):
+        import paramiko.transport
+
+        # reenable server functionality for tests
+        if hasattr(paramiko.transport, "SERVER_DISABLED_BY_GENTOO"):
+            paramiko.transport.SERVER_DISABLED_BY_GENTOO = False
+
         self.commands = []
         socket.setdefaulttimeout(10)
         self.addCleanup(socket.setdefaulttimeout, None)