def test_box_wgs84(self): """Test the Box type with WGS84 coordinates. Test whether the generated XML is correct. """ box = Box(3.6214, 50.9850, 3.8071, 51.1270, epsg=4326) xml = box.get_element() assert clean_xml(etree.tostring(xml).decode('utf8')) == clean_xml( '<gml:Envelope srsDimension="2" ' 'srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">' '<gml:lowerCorner>3.621400 50.985000</gml:lowerCorner>' '<gml:upperCorner>3.807100 51.127000</gml:upperCorner>' '</gml:Envelope>')
def test_box(self): """Test the default Box type. Test whether the generated XML is correct. """ box = Box(94720, 186910, 112220, 202870) xml = box.get_element() assert clean_xml(etree.tostring(xml).decode('utf8')) == clean_xml( '<gml:Envelope srsDimension="2" ' 'srsName="http://www.opengis.net/gml/srs/epsg.xml#31370">' '<gml:lowerCorner>94720.000000 186910.000000</gml:lowerCorner>' '<gml:upperCorner>112220.000000 202870.000000</gml:upperCorner>' '</gml:Envelope>')