Example #1
0
 def testCreateUpdateMetadataFile(self):
     try:
         tmpDirectory = tempfile.mkdtemp('', 'tmp_', TEMPLATE_FILES['tmp_dir'])
         mdFile = createTemporaryCopy(TEMPLATE_FILES['child'], tmpDirectory, 'xml')
         metadata = getMetadataForMesstischblatt(id=71051490,db=self.dbSession,logger=self.logger)
         updateMetadata(mdFile, metadata, self.logger)   
         self.assertTrue(isinstance(mdFile,str), 'Function: testCreateTemporaryCopy - failed because response is not a string.')
         self.assertTrue(os.path.isfile(mdFile), 'Function: testCreateTemporaryCopy - failed because response is not a existing file')
     except:
         raise
  
         
Example #2
0
 def testGetMetadataForMesstischblatt(self):
     response = getMetadataForMesstischblatt(id=71051490,db=self.dbSession,logger=self.logger)
     self.assertIsNotNone(response, 'Function: testGetMetadataFormesstischblatt - failed because response is none.')