[Inteproxy-commits] r172 - in trunk: . test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 25 21:37:23 CET 2008


Author: bh
Date: 2008-11-25 21:37:23 +0100 (Tue, 25 Nov 2008)
New Revision: 172

Modified:
   trunk/ChangeLog
   trunk/test/test_inteproxy.py
Log:
* test/test_inteproxy.py (ServerTest.setUp)
(ServerTest.create_http_proxy)
(TestInteProxyWithExtraProxy.create_http_proxy): Prepare for tests
for authentication at remote proxies by having create_http_proxy
return username and password too


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-11-25 20:34:37 UTC (rev 171)
+++ trunk/ChangeLog	2008-11-25 20:37:23 UTC (rev 172)
@@ -1,5 +1,13 @@
 2008-11-25  Bernhard Herzog  <bh at intevation.de>
 
+	* test/test_inteproxy.py (ServerTest.setUp)
+	(ServerTest.create_http_proxy)
+	(TestInteProxyWithExtraProxy.create_http_proxy): Prepare for tests
+	for authentication at remote proxies by having create_http_proxy
+	return username and password too
+
+2008-11-25  Bernhard Herzog  <bh at intevation.de>
+
 	* test/test_inteproxy.py: Rearrange imports a little so that they
 	succeed if ony the test_inteproxy tests are run
 

Modified: trunk/test/test_inteproxy.py
===================================================================
--- trunk/test/test_inteproxy.py	2008-11-25 20:34:37 UTC (rev 171)
+++ trunk/test/test_inteproxy.py	2008-11-25 20:37:23 UTC (rev 172)
@@ -40,13 +40,13 @@
         self.old_stderr = sys.stderr
         sys.stderr = open(os.path.devnull, "w")
 
-        http_proxy = self.create_http_proxy()
+        http_proxy, username, password = self.create_http_proxy()
         if http_proxy:
             self.http_proxy = httpserver.ServerThread(http_proxy)
             self.http_proxy.start(daemon=True)
             self.http_proxy_desc = Struct(host="localhost",
                                           port=self.http_proxy.server_port,
-                                          username=None, password=None)
+                                          username=username, password=password)
         else:
             self.http_proxy = self.http_proxy_desc = None
 
@@ -73,7 +73,7 @@
         """Override in derived classes to create a proxy upstream from inteproxy
         The method should return the proxy server object object.
         """
-        return None
+        return None, None, None
 
     def tearDown(self):
         try:
@@ -193,10 +193,11 @@
         ]
 
     def create_http_proxy(self):
-        return MasterWorkerServer(("127.0.0.1", 0),
-                                  InteProxyHTTPRequestHandler, 5,
-                                  None, None,
-                                  transcoder_map=create_transcoder_map())
+        server = MasterWorkerServer(("127.0.0.1", 0),
+                                    InteProxyHTTPRequestHandler, 5,
+                                    None, None,
+                                    transcoder_map=create_transcoder_map())
+        return server, None, None
 
     def test(self):
         http = httplib.HTTPConnection("localhost", self.server.server_port)



More information about the Inteproxy-commits mailing list