joey: thuban/Extensions/wms/test test_parser.py,1.3,1.4

cvs@intevation.de cvs at intevation.de
Wed Mar 24 17:34:16 CET 2004


Author: joey

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

Modified Files:
	test_parser.py 
Log Message:
Need to encode non-ascii strings since Python works with unicode
strings internally, otherwise comparisons will fail.

Index: test_parser.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/test/test_parser.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- test_parser.py	19 Mar 2004 19:53:07 -0000	1.3
+++ test_parser.py	24 Mar 2004 16:34:13 -0000	1.4
@@ -103,7 +103,7 @@
         if not self.capabilities:
             self.load_frida()
 
-        self.assertEquals (self.getTitle(),'Frida - Freie Vektor-Geodaten Osnabrück')
+        self.assertEquals (self.getTitle().encode('latin-1'),'Frida - Freie Vektor-Geodaten Osnabrück')
         self.assertEquals (self.getAbstract(),'')
         self.assertEquals (self.getFees(),'')
         self.assertEquals (self.getAccessConstraints(),'')
@@ -114,7 +114,7 @@
                   'strassenhinten', 'strassen', 'beschriftung',
                   'hauptbeschriftung', 'sehenswuerdigkeiten']
         self.compareLists (self.getLayers(),layers)
-        self.compareLists (self.getSRS(),[31493])
+        self.compareLists (self.getSRS(),['31493'])
 
 
     def test_LayerTitle (self):
@@ -126,16 +126,16 @@
             self.load_frida()
 
         # main layer
-        self.assertEquals (self.getLayerTitle('Osnabrueck'),'Frida - Freie Vektor-Geodaten Osnabrück')
+        self.assertEquals (self.getLayerTitle('Osnabrueck').encode('latin-1'),'Frida - Freie Vektor-Geodaten Osnabrück')
 
         # first nested layer
-        self.assertEquals (self.getLayerTitle('gruenflaechen'),'Grünflächen')
+        self.assertEquals (self.getLayerTitle('gruenflaechen').encode('latin-1'),'Grünflächen')
 
         # first nested layer
-        self.assertEquals (self.getLayerTitle('gewaesser'),'Gewässer')
+        self.assertEquals (self.getLayerTitle('gewaesser').encode('latin-1'),'Gewässer')
 
         # second nested layer
-        self.assertEquals (self.getLayerTitle('gewaesserpolyl'),'Gewässerflächen')
+        self.assertEquals (self.getLayerTitle('gewaesserpolyl').encode('latin-1'),'Gewässerflächen')
 
 
     def test_LayerSRS (self):





More information about the Thuban-devel mailing list

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