2
0
Эх сурвалжийг харах

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 2 жил өмнө
parent
commit
07ac694d25

+ 6 - 0
dulwich/contrib/test_paramiko_vendor.py

@@ -122,6 +122,12 @@ class Server(paramiko.ServerInterface):
 class ParamikoSSHVendorTests(TestCase):
 class ParamikoSSHVendorTests(TestCase):
 
 
     def setUp(self):
     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 = []
         self.commands = []
         socket.setdefaulttimeout(10)
         socket.setdefaulttimeout(10)
         self.addCleanup(socket.setdefaulttimeout, None)
         self.addCleanup(socket.setdefaulttimeout, None)