rhel: Add 'rpm-fedora' and 'rpm-fedora-kmod' targets
[cascardo/ovs.git] / tests / test-l7.py
index 65c6c2a..aed34f4 100755 (executable)
@@ -30,9 +30,17 @@ def get_ftpd():
         from pyftpdlib.handlers import FTPHandler
         from pyftpdlib.servers import FTPServer
 
+        import logging
+        import pyftpdlib.log
+        pyftpdlib.log.LEVEL = logging.DEBUG
+
         class OVSFTPHandler(FTPHandler):
             authorizer = DummyAuthorizer()
             authorizer.add_anonymous("/tmp")
+            # Hack around a bug in pyftpdlib, which rejects EPRT
+            # connection due to mismatching textual representation of
+            # the IPv6 address.
+            permit_foreign_addresses = True
         server = [FTPServer, OVSFTPHandler, 21]
     except ImportError:
         server = None
@@ -42,7 +50,7 @@ def get_ftpd():
 
 def main():
     SERVERS = {
-        'http':  [TCPServer,   SimpleHTTPRequestHandler, 80],
+        'http': [TCPServer, SimpleHTTPRequestHandler, 80],
         'http6': [TCPServerV6, SimpleHTTPRequestHandler, 80],
     }