[Inteproxy-commits] r199 - in trunk: . test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 10 22:12:10 CEST 2009
Author: bh
Date: 2009-09-10 22:12:10 +0200 (Thu, 10 Sep 2009)
New Revision: 199
Modified:
trunk/ChangeLog
trunk/test/test_inteproxy.py
Log:
* test/test_inteproxy.py (ServerTest.create_transcoder_map): Use
lists of inteproxy-urls instead of tuples of strings to describe
he rules
(TestInteProxyURLRewriting.transcoder_definitions): convert the
rules to inteproxy urls
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-10 20:10:17 UTC (rev 198)
+++ trunk/ChangeLog 2009-09-10 20:12:10 UTC (rev 199)
@@ -1,5 +1,13 @@
2009-09-10 Bernhard Herzog <bh at intevation.de>
+ * test/test_inteproxy.py (ServerTest.create_transcoder_map): Use
+ lists of inteproxy-urls instead of tuples of strings to describe
+ he rules
+ (TestInteProxyURLRewriting.transcoder_definitions): convert the
+ rules to inteproxy urls
+
+2009-09-10 Bernhard Herzog <bh at intevation.de>
+
* inteproxy/transcoder.py
(TranscoderMap.add_rule, TranscoderMap.add_rules):
New. Replacements for add_host and add_hosts
Modified: trunk/test/test_inteproxy.py
===================================================================
--- trunk/test/test_inteproxy.py 2009-09-10 20:10:17 UTC (rev 198)
+++ trunk/test/test_inteproxy.py 2009-09-10 20:12:10 UTC (rev 199)
@@ -17,7 +17,7 @@
from inteproxy.transcoder import create_transcoder_map
from inteproxy.proxycore import MasterWorkerServer, InteProxyHTTPRequestHandler
-from inteproxy.config import Struct
+from inteproxy.config import Struct, parse_inteproxy_url
import inteproxy.httpserver as httpserver
@@ -31,7 +31,7 @@
# serversupport.HTTPServer. Override in derived classes.
remote_contents = []
- # transcoders to use
+ # transcoders to use specified as a list of inteproxy urls
transcoder_definitions = []
# whether the server should rewrite urls
@@ -66,8 +66,8 @@
def create_transcoder_map(self):
transcoder_map = transcoder_map=create_transcoder_map()
- for host, path, cls in self.transcoder_definitions:
- transcoder_map.add_host(host, path, cls)
+ for url in self.transcoder_definitions:
+ transcoder_map.add_rule(parse_inteproxy_url(url))
return transcoder_map
def create_http_proxy(self):
@@ -139,12 +139,11 @@
]
- transcoder_definitions = [
- ("example.com", "/a/wms", "owsproxy"),
- ("example.com", "/another/wms", "owsproxy"),
- ("example.com", "/pattern/*", "owsproxy"),
- ("*.intevation.*", "/wms*", "owsproxy"),
- ]
+ transcoder_definitions = ["owsproxy://example.com/a/wms",
+ "owsproxy://example.com/another/wms",
+ "owsproxy://example.com/pattern/*",
+ "owsproxy://*.intevation.*/wms*",
+ ]
rewrite_urls = True
More information about the Inteproxy-commits
mailing list