Esempio n. 1
0
 def testCoverageIds(self):
     logger.info("Checking Coverage Ids ...")
     decoder = XMLDecoder(self.getXMLData(), {
         "coverageids": {"xml_location": "/wcs:CoverageDescriptions/wcs:CoverageDescription/wcs:CoverageId", "xml_type": "string[]"}
     })
     
     result_coverage_ids = decoder.getValue("coverageids")
     expected_coverage_ids = self.getExpectedCoverageIds()
     self.assertItemsEqual(result_coverage_ids, expected_coverage_ids)
     
     # assert that every coverage ID is unique in the response
     for coverage_id in result_coverage_ids:
         self.assertTrue(result_coverage_ids.count(coverage_id) == 1, "CoverageID %s is not unique." % coverage_id)
Esempio n. 2
0
 def testSections(self):
     decoder = XMLDecoder(self.getXMLData(), {
         "sections": {"xml_location": "/*", "xml_type": "tagName[]"}
     })
     sections = decoder.getValue("sections")
     self.assertItemsEqual(sections, self.getExpectedSections())
Esempio n. 3
0
 def testCoverageCount(self):
     decoder = XMLDecoder(self.getXMLData(), {
         "coverageids": {"xml_location": "/wcs:CoverageDescriptions/wcs:CoverageDescription/wcs:CoverageId", "xml_type": "string[]"}
     })
     coverage_ids = decoder.getValue("coverageids")
     self.assertEqual(len(coverage_ids), self.getExpectedCoverageCount())
Esempio n. 4
0
 def testExceptionCode(self):
     logger.info("Checking OWS Exception Code ...")
     decoder = XMLDecoder(self.getXMLData(), {
         "exceptionCode": {"xml_location": self.getExceptionCodeLocation(), "xml_type": "string"}
     })
     self.assertEqual(decoder.getValue("exceptionCode"), self.getExpectedExceptionCode())