Ignore:
Timestamp:
19/01/09 16:52:53 (11 years ago)
Author:
cbyrom
Message:

Improve url check, by creating new method which sets the default
proxies to use with the lookup + adjust CSML creation to have the
dataset ID as a keyword - to allow this to be randomly generated if not
set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/unittests/clients/xmldb/eXist/testexistdbclient.py

    r4810 r4844  
    129129 
    130130    def testSetUpEXistDB(self): 
    131         molesSchema = self.VALID_COLLECTION_PATH + \ 
    132                 ndgXqueries.ATOM_MOLES_SCHEMA  + '.xsd' 
    133         self.utils.dbc.deleteEXistFile(molesSchema) 
    134         self.assertEquals(None, self.utils.dbc._eXistDBClient__lookupEXistFile(molesSchema)) 
     131        fileName = self.utils.dbc.xmldb.xq.xsd.keys()[0] + '.xsd' 
     132        pathName = ec.BASE_COLLECTION_PATH + fileName 
     133        self.utils.dbc.deleteEXistFile(pathName) 
     134        self.assertEquals(None, self.utils.dbc._eXistDBClient__lookupEXistFile(pathName)) 
    135135 
    136136        newClient = dbc.eXistDBClient(configFile = self.confFile, setUpDB = True) 
    137         self.assertNotEquals(None, newClient._eXistDBClient__lookupEXistFile(molesSchema)) 
     137        self.assertNotEquals(None, newClient._eXistDBClient__lookupEXistFile(pathName)) 
    138138 
    139139 
     
    242242        atom = self.utils.createAtomInEXist(tc.xmlString) 
    243243        atom = self.utils.createAtomInEXist(tc.xmlString) 
     244        time.sleep(5) 
    244245        backupPath = self.utils.dbc.backupName 
    245246        self.utils.dbc.deleteAtomInExist(atom) 
     
    259260        self.createdAtoms.append(atom.getFullPath()) 
    260261        self.utils.dbc.createDIFDocumentFromAtom(atom) 
     262 
     263    def testTransformAtomIntoDIF(self): 
     264        atom = self.utils.createAtom(tc.xmlString) 
     265        atom.atomTypeID = VTD.DE_TERM 
     266        atom = self.utils.dbc.createAtomInExist(atom) 
     267        self.createdAtoms.append(atom.getFullPath()) 
     268        doc = self.utils.dbc.transformAtomIntoDIF(atom) 
     269        self.assertNotEquals(None, doc) 
     270        self.assertTrue(doc.find('DIF') > -1) 
     271        self.assertTrue(doc.find(atom.datasetID) > -1) 
    261272         
    262273    def tearDown(self): 
Note: See TracChangeset for help on using the changeset viewer.