def test_capabilities_130(self): req = WMS130CapabilitiesRequest(url='/service?').copy_with_request_params(self.common_req) resp = self.app.get(req) xml = resp.lxml assert is_130_capa(xml) min_scales = xml.xpath('//wms:Layer/wms:Layer/wms:MinScaleDenominator/text()', namespaces=ns130) max_scales = xml.xpath('//wms:Layer/wms:Layer/wms:MaxScaleDenominator/text()', namespaces=ns130) assert_almost_equal(float(min_scales[0]), 35714.28, 1) assert_almost_equal(float(max_scales[0]), 35714285.7, 1) assert_almost_equal(float(min_scales[1]), 10000, 2) assert_almost_equal(float(max_scales[1]), 1000000, 2) assert_almost_equal(float(min_scales[2]), 1000, 2) assert_almost_equal(float(max_scales[2]), 10000, 2)
def test_capabilities_130(self): req = WMS130CapabilitiesRequest( url='/service?').copy_with_request_params(self.common_req) resp = self.app.get(req) xml = resp.lxml assert is_130_capa(xml) min_scales = xml.xpath( '//wms:Layer/wms:Layer/wms:MinScaleDenominator/text()', namespaces=ns130) max_scales = xml.xpath( '//wms:Layer/wms:Layer/wms:MaxScaleDenominator/text()', namespaces=ns130) assert_almost_equal(float(min_scales[0]), 35714.28, 1) assert_almost_equal(float(max_scales[0]), 35714285.7, 1) assert_almost_equal(float(min_scales[1]), 10000, 2) assert_almost_equal(float(max_scales[1]), 1000000, 2) assert_almost_equal(float(min_scales[2]), 1000, 2) assert_almost_equal(float(max_scales[2]), 10000, 2)
def test_capabilities_130(self, app): req = WMS130CapabilitiesRequest(url="/service?").copy_with_request_params( self.common_req ) resp = app.get(req) xml = resp.lxml assert is_130_capa(xml) min_scales = xml.xpath( "//wms:Layer/wms:Layer/wms:MinScaleDenominator/text()", namespaces=ns130 ) max_scales = xml.xpath( "//wms:Layer/wms:Layer/wms:MaxScaleDenominator/text()", namespaces=ns130 ) assert float(min_scales[0]) == pytest.approx(35714.28) assert float(max_scales[0]) == pytest.approx(35714285.7) assert float(min_scales[1]) == pytest.approx(10000) assert float(max_scales[1]) == pytest.approx(1000000) assert float(min_scales[2]) == pytest.approx(1000) assert float(max_scales[2]) == pytest.approx(10000)
def test_130_capa(self): resp = self.app.get("/service?request=GetCapabilities&service=WMS&version=1.3.0") xml = resp.lxml assert is_130_capa(xml) self._check_layernames_with_namespace(xml, ns130)
def test_130_capa(self): resp = self.app.get( "/service?request=GetCapabilities&service=WMS&version=1.3.0") xml = resp.lxml assert is_130_capa(xml) self._check_layernames_with_namespace(xml, ns130)
def test_unknown_version_200(self, app): resp = app.get( "http://localhost/service?SERVICE=WMS&REQUEST=GetCapabilities" "&VERSION=2.0.0" ) assert is_130_capa(resp.lxml)
def test_default_version_130(self, app): resp = app.get("http://localhost/service?SERVICE=WMS&REQUEST=GetCapabilities") assert is_130_capa(resp.lxml)