def test_get_legendgraphic_invalid_sld_version_130(self):
     req = str(self.common_lg_req_130).replace('sld_version=1.1.0', 'sld_version=1.0.0')
     resp = self.app.get(req)
     eq_(resp.content_type, 'text/xml')
     xml = resp.lxml
     eq_xpath_wms130(xml, '/ogc:ServiceExceptionReport/@version', '1.3.0')
     eq_xpath_wms130(xml, '//ogc:ServiceException/text()', 'invalid sld_version 1.0.0')
     assert validate_with_xsd(xml, xsd_name='wms/1.3.0/exceptions_1_3_0.xsd')
 def test_get_legendgraphic_missing_params_130(self):
     req = str(self.common_lg_req_130).replace('format', 'invalid')
     resp = self.app.get(req)
     eq_(resp.content_type, 'text/xml')
     xml = resp.lxml
     eq_xpath_wms130(xml, '/ogc:ServiceExceptionReport/@version', '1.3.0')
     eq_xpath_wms130(xml, '//ogc:ServiceException/text()', "missing parameters ['format']")
     assert validate_with_xsd(xml, xsd_name='wms/1.3.0/exceptions_1_3_0.xsd')
 def test_get_legendgraphic_no_legend_130(self):
     self.common_lg_req_130.params['layer'] = 'wms_no_legend'
     resp = self.app.get(self.common_lg_req_130)
     eq_(resp.content_type, 'text/xml')
     xml = resp.lxml
     eq_xpath_wms130(xml, '/ogc:ServiceExceptionReport/@version', '1.3.0')
     eq_xpath_wms130(xml, '//ogc:ServiceException/text()', 'layer wms_no_legend has no legend graphic')
     assert validate_with_xsd(xml, xsd_name='wms/1.3.0/exceptions_1_3_0.xsd')
 def test_get_legendgraphic_invalid_sld_version_130(self):
     req = str(self.common_lg_req_130).replace('sld_version=1.1.0', 'sld_version=1.0.0')
     resp = self.app.get(req)
     eq_(resp.content_type, 'text/xml')
     xml = resp.lxml
     eq_xpath_wms130(xml, '/ogc:ServiceExceptionReport/@version', '1.3.0')
     eq_xpath_wms130(xml, '//ogc:ServiceException/text()', 'invalid sld_version 1.0.0')
     assert validate_with_xsd(xml, xsd_name='wms/1.3.0/exceptions_1_3_0.xsd')
 def test_get_legendgraphic_missing_params_130(self):
     req = str(self.common_lg_req_130).replace('format', 'invalid')
     resp = self.app.get(req)
     eq_(resp.content_type, 'text/xml')
     xml = resp.lxml
     eq_xpath_wms130(xml, '/ogc:ServiceExceptionReport/@version', '1.3.0')
     eq_xpath_wms130(xml, '//ogc:ServiceException/text()', "missing parameters ['format']")
     assert validate_with_xsd(xml, xsd_name='wms/1.3.0/exceptions_1_3_0.xsd')
 def test_get_legendgraphic_no_legend_130(self):
     self.common_lg_req_130.params['layer'] = 'wms_no_legend'
     resp = self.app.get(self.common_lg_req_130)
     eq_(resp.content_type, 'text/xml')
     xml = resp.lxml
     eq_xpath_wms130(xml, '/ogc:ServiceExceptionReport/@version', '1.3.0')
     eq_xpath_wms130(xml, '//ogc:ServiceException/text()', 'layer wms_no_legend has no legend graphic')
     assert validate_with_xsd(xml, xsd_name='wms/1.3.0/exceptions_1_3_0.xsd')