Imports and initialize

    >>> from __future__ import (absolute_import, division, print_function)
    >>> from owslib.wfs import WebFeatureService
    >>> from tests.utils import resource_file, sorted_url_query

    >>> getcapsin = open(resource_file("wfs_CUZK_GetCapabilities_2_0_0.xml"), 'rb').read()
    >>> wfs = WebFeatureService('http://services.cuzk.cz/wfs/inspire-cp-wfs.asp', xml=getcapsin, version='2.0.0')

Test the capabilities info
    >>> wfs.identification.service
    'OGC WFS'
    >>> wfs.identification.version
    '2.0.0'
    >>> wfs.identification.title
    'CZE INSPIRE Download Service - Cadastral Parcels'
    >>> wfs.identification.abstract
    'Cadastral Parcels - INSPIRE themes'
    >>> sorted(wfs.identification.keywords)
    ['Cadastral Parcel Boundaries', 'Cadastral Zoning polygons', 'Cadastral parcel polygons']
    >>> wfs.identification.fees
    >>> wfs.identification.accessconstraints
    >>> wfs.provider.name
    'Czech Office for Surveying, Mapping and Cadastre'
    >>> wfs.provider.url
    'www.cuzk.cz'
    >>> wfs.provider.contact.email
    >>> wfs.provider.contact.phone
    '+420284041550'
    >>> wfs.provider.contact.name
    >>> wfs.provider.contact.organization
    >>> wfs.provider.contact.city
    >>> wfs.provider.contact.region
    >>> wfs.provider.contact.postcode
    >>> wfs.provider.contact.country

Test the getfeature method

    >>> sorted(wfs.contents.keys())
    ['CP:CadastralBoundary', 'CP:CadastralParcel', 'CP:CadastralZoning']

    >>> wfs.contents['CP:CadastralBoundary'].crsOptions[0].getcodeurn()
    'urn:ogc:def:crs:EPSG::102067'

    >>> sorted_url_query(wfs.getGETGetFeatureRequest(typename=['CP:CadastralBoundary'], maxfeatures=2))
    ['maxfeatures=2', 'request=GetFeature', 'service=WFS', 'typename=CP%3ACadastralBoundary', 'version=2.0.0']

    >>> sorted_url_query(wfs.getGETGetFeatureRequest(typename=['CP:CadastralBoundary'], maxfeatures=2, bbox=[15,49,16,51,'urn:ogc:def:crs:EPSG:4326']))
    ['bbox=49%2C15%2C51%2C16%2Curn%3Aogc%3Adef%3Acrs%3AEPSG%3A%3A4326', 'maxfeatures=2', 'request=GetFeature', 'service=WFS', 'typename=CP%3ACadastralBoundary', 'version=2.0.0']

    >>> sorted_url_query(wfs.getGETGetFeatureRequest(typename=['CP:CadastralBoundary'], maxfeatures=2, bbox=[-685336,-993518,-684996,-993285]))
    ['bbox=-685336%2C-993518%2C-684996%2C-993285%2Curn%3Aogc%3Adef%3Acrs%3AEPSG%3A%3A102067', 'maxfeatures=2', 'request=GetFeature', 'service=WFS', 'typename=CP%3ACadastralBoundary', 'version=2.0.0']
