[Pywps-commits] r1190 - trunk/tests

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 24 15:54:42 CEST 2011


Author: jachym
Date: 2011-08-24 15:54:42 +0200 (Wed, 24 Aug 2011)
New Revision: 1190

Modified:
   trunk/tests/schema_validation.py
Log:
added test for #1534

Modified: trunk/tests/schema_validation.py
===================================================================
--- trunk/tests/schema_validation.py	2011-08-24 13:32:13 UTC (rev 1189)
+++ trunk/tests/schema_validation.py	2011-08-24 13:54:42 UTC (rev 1190)
@@ -56,7 +56,32 @@
     
     #execute
     
+    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"""
         



More information about the Pywps-commits mailing list