def test_copy_with_request_params(self): # check that we allways have our internal axis order req1 = WMS130MapRequest(param=dict(bbox="10,0,20,40", crs='EPSG:4326')) eq_(req1.params.bbox, (0.0, 10.0, 40.0, 20.0)) req2 = WMS111MapRequest(param=dict(bbox="0,10,40,20", srs='EPSG:4326')) eq_(req2.params.bbox, (0.0, 10.0, 40.0, 20.0)) # 130 <- 111 req3 = req1.copy_with_request_params(req2) eq_(req3.params.bbox, (0.0, 10.0, 40.0, 20.0)) assert isinstance(req3, WMS130MapRequest) # 130 <- 130 req4 = req1.copy_with_request_params(req3) eq_(req4.params.bbox, (0.0, 10.0, 40.0, 20.0)) assert isinstance(req4, WMS130MapRequest) # 111 <- 130 req5 = req2.copy_with_request_params(req3) eq_(req5.params.bbox, (0.0, 10.0, 40.0, 20.0)) assert isinstance(req5, WMS111MapRequest)
def test_130_order_proj(self): self.params130['crs'] = 'EPSG:31463' req130 = WMS130MapRequest(self.params130) eq_(req130.params.bbox, (8, 4, 9, 5))
def test_130_order_proj_north_east(self): self.params130['crs'] = 'EPSG:31466' req130 = WMS130MapRequest(self.params130) eq_(req130.params.bbox, (4, 8, 5, 9))
def test_130_order_geog_old(self): self.params130['crs'] = 'CRS:84' req130 = WMS130MapRequest(self.params130) eq_(req130.params.bbox, (8, 4, 9, 5))
def test_130_order_geog(self): req130 = WMS130MapRequest(self.params130) eq_(req130.params.bbox, (4, 8, 5, 9)) self.params130['crs'] = 'EPSG:4258' req130 = WMS130MapRequest(self.params130) eq_(req130.params.bbox, (4, 8, 5, 9))
def test_130_order_proj(self): self.params130["crs"] = "EPSG:31463" req130 = WMS130MapRequest(self.params130) assert req130.params.bbox == (8, 4, 9, 5)
def test_130_order_proj_north_east(self): self.params130["crs"] = "EPSG:31466" req130 = WMS130MapRequest(self.params130) assert req130.params.bbox == (4, 8, 5, 9)
def test_130_order_geog_old(self): self.params130["crs"] = "CRS:84" req130 = WMS130MapRequest(self.params130) assert req130.params.bbox == (8, 4, 9, 5)
def test_130_order_geog(self): req130 = WMS130MapRequest(self.params130) assert req130.params.bbox == (4, 8, 5, 9) self.params130["crs"] = "EPSG:4258" req130 = WMS130MapRequest(self.params130) assert req130.params.bbox == (4, 8, 5, 9)
def setup(self): self.r = WMS130MapRequest(param=dict(layers='foo', WMTVER='1.0.0')) self.r.params = self.r.adapt_params_to_version()