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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jun 12 18:01:52 CEST 2008


Author: bh
Date: 2008-06-12 18:01:52 +0200 (Thu, 12 Jun 2008)
New Revision: 141

Modified:
   trunk/ChangeLog
   trunk/test/test_inteproxy.py
Log:
* test/test_inteproxy.py (ServerTest.remote_contents)
(TestInteProxy.remote_contents)
(TestInteProxyWithExtraProxy.remote_contents): Move the actual
contents from ServerTest to the test classes


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-06-12 13:43:43 UTC (rev 140)
+++ trunk/ChangeLog	2008-06-12 16:01:52 UTC (rev 141)
@@ -1,5 +1,12 @@
 2008-06-12  Bernhard Herzog  <bh at intevation.de>
 
+	* test/test_inteproxy.py (ServerTest.remote_contents)
+	(TestInteProxy.remote_contents)
+	(TestInteProxyWithExtraProxy.remote_contents): Move the actual
+	contents from ServerTest to the test classes
+
+2008-06-12  Bernhard Herzog  <bh at intevation.de>
+
 	Use httplib instead of urllib2.  This makes the code much simpler
 	and we can remove the various workarounds that were added to make
 	urllib2 less intelligent.

Modified: trunk/test/test_inteproxy.py
===================================================================
--- trunk/test/test_inteproxy.py	2008-06-12 13:43:43 UTC (rev 140)
+++ trunk/test/test_inteproxy.py	2008-06-12 16:01:52 UTC (rev 141)
@@ -25,9 +25,9 @@
     """Base class for tests that run the InteProxy in a thread"""
 
 
-    remote_contents = [
-        ("/wms", [("Content-Type", "text/plain")], "wms data"),
-        ]
+    # The content of the remote server in the format used by
+    # serversupport.HTTPServer.  Override in derived classes.
+    remote_contents = []
 
     def setUp(self):
         self.old_stderr = sys.stderr
@@ -73,6 +73,11 @@
 
 class TestInteProxy(ServerTest):
 
+    remote_contents = [
+        ("/wms", [("Content-Type", "text/plain")], "wms data"),
+        ]
+
+
     def test_httpproxy_passthrough(self):
         http = httplib.HTTPConnection("localhost", self.server.server_port)
         http.request("GET", self.remote_server_base_url + "wms")
@@ -81,9 +86,12 @@
         data = response.read()
         self.assertEquals(data, "wms data")
 
-
 class TestInteProxyWithExtraProxy(ServerTest):
 
+    remote_contents = [
+        ("/wms", [("Content-Type", "text/plain")], "wms data"),
+        ]
+
     def create_http_proxy(self):
         return MasterWorkerServer(("127.0.0.1", 0),
                                   InteProxyHTTPRequestHandler, 5,



More information about the Inteproxy-commits mailing list