joey: thuban/Extensions/wms/test test_ogclib.py,1.2,1.3

cvs@intevation.de cvs at intevation.de
Thu Mar 18 09:15:56 CET 2004


Author: joey

Update of /thubanrepository/thuban/Extensions/wms/test
In directory doto:/tmp/cvs-serv23211

Modified Files:
	test_ogclib.py 
Log Message:
The format specification is a mime-type, not a graphic format, hence
image/jpeg wou ld be the proper format and not JPEG.  We'll also have
to take care of the encoding of / as %2F.

Index: test_ogclib.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/test/test_ogclib.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test_ogclib.py	16 Mar 2004 17:28:26 -0000	1.2
+++ test_ogclib.py	18 Mar 2004 08:15:54 -0000	1.3
@@ -6,12 +6,12 @@
 # Read the file COPYING coming with Thuban for details.
 
 """
-Test for the PyOGCLib from Sean C. Gillies
+Test for the PyOGCLib from Sean C. Gillies <sgillies at users.sourceforge.net>
 
 http://www.sourceforge.net/projects/pyogclib
 
 Requires the ogclib installed regularily on the system or checked out
-next to the thuban checkout
+next to the Thuban checkout.
 """
 
 __version__ = "$Revision$"
@@ -72,7 +72,7 @@
             bar_opts = split (bar_tuple[1], "&")
 
             if len(foo_opts) != len(bar_opts):
-                self.fail ("different number of arguments");
+                self.fail ("Different number of arguments");
 
             for part in foo_opts:
                 if part not in bar_opts:
@@ -117,7 +117,8 @@
 
         frida = "http://frida.intevation.org/cgi-bin/frida_wms?"
 
-        format = 'JPEG'
+        format = 'image/jpeg'
+        format_enc = 'image%2Fjpeg'
         width = 400
         height = 350
         epsg = 4326
@@ -127,7 +128,7 @@
         version = '1.1'
 
         result_base = frida + "WMTVER=1.0&REQUEST=map" + \
-                      "&FORMAT="+format + \
+                      "&FORMAT="+format_enc + \
                       "&SRS=EPSG%s%d" % ("%3A", epsg) + \
                       "&BBOX=%f%s%f%s%f%s%f" % (bbox['minx'], "%2C", bbox['miny'], "%2C",
                                                 bbox['maxx'], "%2C", bbox['maxy']) + \
@@ -141,7 +142,7 @@
         # Repeat and continue with version 1.1, as denoted in OGC 01-068r3
         version = '1.1'
         result_base = frida + "VERSION=1.1&SERVICE=WMS&REQUEST=GetMap" + \
-                      "&FORMAT="+format + \
+                      "&FORMAT="+format_enc + \
                       "&SRS=EPSG%s%d" % ("%3A", epsg) + \
                       "&BBOX=%f%s%f%s%f%s%f" % (bbox['minx'], "%2C", bbox['miny'], "%2C",
                                                 bbox['maxx'], "%2C", bbox['maxy']) + \
@@ -198,8 +199,6 @@
                              bbox, layers, version=version,
                              styles = styles)
         self.compare_URLs (result, url)
-
-        # print url
 
 
 if __name__ == "__main__":





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)