[Pywps-commits] r1199 - branches/pywps-3.2-soap/tests
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Aug 31 10:55:24 CEST 2011
Author: jesus
Date: 2011-08-31 10:55:24 +0200 (Wed, 31 Aug 2011)
New Revision: 1199
Modified:
branches/pywps-3.2-soap/tests/schema_validation.py
Log:
sync with trunk. New test
Modified: branches/pywps-3.2-soap/tests/schema_validation.py
===================================================================
--- branches/pywps-3.2-soap/tests/schema_validation.py 2011-08-31 08:54:45 UTC (rev 1198)
+++ branches/pywps-3.2-soap/tests/schema_validation.py 2011-08-31 08:55:24 UTC (rev 1199)
@@ -53,7 +53,33 @@
def setUp(self):
#Silence PyWPS Warning: Usage of....
sys.stderr=open("/dev/null","w")
+
+ def testStatusLocation(self):
+ """Test, status=false, storeexecuteresposne=false, statusLocation
+ file should NOT be empty"""
+ self._setFromEnv()
+ schemaDocExecute=etree.XML(urllib.urlopen(self.executeSchemaResponse).read(),parser=self.parser,base_url=self.base_url)
+ schemaExecute=etree.XMLSchema(schemaDocExecute)
+
+ mypywps = pywps.Pywps(pywps.METHOD_GET)
+ inputs = mypywps.parseRequest("service=wps&request=execute&version=1.0.0&identifier=ultimatequestionprocess&status=false&storeExecuteResponse=false")
+ mypywps.performRequest()
+
+ #First parse
+ executeAssyncGET=etree.XML(mypywps.response,self.parser)
+ self.assertEquals(schemaExecute.assertValid(executeAssyncGET),None)
+
+ #get path to status document
+ fileName=os.path.basename(executeAssyncGET.xpath("//*[local-name()='ExecuteResponse']/@statusLocation")[0])
+ filePath=pywps.config.getConfigValue("server","outputPath")+"/"+fileName
+
+ self.assertEquals(True,os.path.exists(filePath))
+ fileOpen = open(filePath)
+
+ self.assertEquals(fileOpen.read(), mypywps.response)
+
+
def testAssync(self):
"""Test assync status document"""
@@ -190,7 +216,7 @@
self.assertEquals(schemaExecute.assertValid(executeComplexInputPOST),None)
- def testExecuteComplexInputDirect(self):
+ def testExecuteComplexInputOutputDirect(self):
"""Testing raster and vector I/O"""
self._setFromEnv()
More information about the Pywps-commits
mailing list