Changeset 515
- Timestamp:
- 10/18/06 00:13:45
- Files:
-
- OWSLib/trunk/owslib/wfs.py (modified) (4 diffs)
- OWSLib/trunk/tests/MapServerWFSCapabilities.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OWSLib/trunk/owslib/wfs.py
r514 r515 22 22 23 23 import cgi 24 import urllib 24 from urllib import urlencode, urlopen 25 25 26 from etree import etree 26 27 … … 166 167 self.crsOptions = [srs.text for srs in elem.findall(nspath('SRS'))] 167 168 169 # verbs 170 self.verbOptions = [op.tag for op \ 171 in parent.findall(nspath('Operations/*'))] 172 self.verbOptions + [op.tag for op \ 173 in elem.findall(nspath('Operations/*')) \ 174 if op.tag not in self.verbOptions] 175 168 176 169 177 class OperationMetadata: … … 314 322 qs.append(('version', self.version)) 315 323 316 urlqs = url lib.urlencode(tuple(qs))324 urlqs = urlencode(tuple(qs)) 317 325 return service_url.split('?')[0] + '?' + urlqs 318 326 … … 327 335 """ 328 336 request = self.capabilities_url(url) 329 u = url lib.urlopen(request)337 u = urlopen(request) 330 338 return WFSCapabilitiesInfoset(etree.fromstring(u.read())) 331 339 OWSLib/trunk/tests/MapServerWFSCapabilities.txt
r514 r515 32 32 >>> wfs.capabilities.getContentByName('IBA').crsOptions 33 33 ['EPSG:4326'] 34 >>> wfs.capabilities.getContentByName('IBA').verbOptions 35 ['{http://www.opengis.net/wfs}Query'] 34 36 35 37 Expect a KeyError for invalid names … … 51 53 Lastly, test the getcapabilities method 52 54 55 >>> wfs = WebFeatureService('http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?', version='1.0') 56 >>> xml = wfs.getcapabilities().read() 57 >>> xml.find('<WFS_Capabilities') > 0 58 True 59
