joey: thuban/Extensions/wms/test test_ogclib.py,1.7,1.8
cvs@intevation.de
cvs at intevation.de
Tue Nov 30 17:56:52 CET 2004
Author: joey
Update of /thubanrepository/thuban/Extensions/wms/test
In directory doto:/tmp/cvs-serv25244
Modified Files:
test_ogclib.py
Log Message:
Improved the test for the internal compare method
Index: test_ogclib.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/test/test_ogclib.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- test_ogclib.py 13 Aug 2004 16:18:46 -0000 1.7
+++ test_ogclib.py 30 Nov 2004 16:56:50 -0000 1.8
@@ -96,20 +96,36 @@
def test_compareURLs(self):
"""Perform some tests for own compare routine"""
+ # Compare same base URL
result = "http://frida.intevation.org/cgi-bin"
self.compare_URLs("http://frida.intevation.org/cgi-bin", result)
+ # Compare different base URL with same length
+ self.assertRaises(AssertionError, self.compare_URLs, "http://frida.intevation.org/cgi-lib", result)
+
+ # Compare same bse with one argument
result = "http://frida.intevation.org/cgi-bin?foo=eins"
self.compare_URLs("http://frida.intevation.org/cgi-bin?foo=eins", result)
- result = "http://frida.intevation.org/cgi-bin?foo=eins&bar=zwei"
- self.compare_URLs("http://frida.intevation.org/cgi-bin?foo=eins&bar=zwei", result)
+ # Compare same base URL differnt first argument
+ self.assertRaises(AssertionError, self.compare_URLs, "http://frida.intevation.org/cgi-bin?bar=eins", result)
+ # Compare same base with two arguments
result = "http://frida.intevation.org/cgi-bin?foo=eins&bar=zwei"
+ self.compare_URLs("http://frida.intevation.org/cgi-bin?foo=eins&bar=zwei", result)
self.compare_URLs("http://frida.intevation.org/cgi-bin?bar=zwei&foo=eins", result)
+ # Compare same base with different two arguments
+ self.assertRaises(AssertionError, self.compare_URLs, "http://frida.intevation.org/cgi-bin?foo=zwei&bar=eins", result)
+
+ # Compare same base with three arguments
result = "http://frida.intevation.org/cgi-bin?foo=eins&bar=zwei&baz=jan&quux=tux"
+ self.compare_URLs("http://frida.intevation.org/cgi-bin?foo=eins&bar=zwei&baz=jan&quux=tux", result)
self.compare_URLs("http://frida.intevation.org/cgi-bin?baz=jan&bar=zwei&quux=tux&foo=eins", result)
+
+ # Compare same base with different three arguments
+ testurl = "http://frida.intevation.org/cgi-bin?baz=jan&foo=zwei&quux=tux&bar=eins"
+ self.assertRaises(AssertionError, self.compare_URLs, testurl, result)
def test_CapabilityURL(self):
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)