Ignore:
Timestamp:
26/03/07 22:21:36 (13 years ago)
Author:
lawrence
Message:

Sundry testcases plus a a bug fix for ticket:666 ... it's done, but I
don't like this bugfix because it shows that I don't really understand
unicode properly. Need to revisit unicode again ... later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/DIF.py

    r2315 r2330  
    7979            #print '[%s]\n%s'%(name,ET.tostring(parameter)) 
    8080            if name=='': 
    81                 name=parameter.text 
     81                name=helper.getText(parameter,'./')#.text 
    8282                if name is not None:  
    8383                    #self.parameters.append(name.replace('>','/')) 
     
    117117        if (self.authors!='' and self.date!='' and self.title!=''): 
    118118            self.briefCitation='%s (%s): %s'%(self.authors,self.date,self.title) 
    119  
    120119        #services 
    121120        self.services=[] 
     
    182181        ''' Testing obtaining parameters from an edmed dif in original format ''' 
    183182        print 'Parameters %s'%self.dif.parameters 
     183         
     184    def testDifficult(self): 
     185        ''' Grab a test example from the internet and load it ''' 
     186        from ndgRetrieve import ndgRetrieve 
     187        retriever=ndgRetrieve('./') 
     188        testURI='grid.bodc.nerc.ac.uk__DIF__EDMED1048008' 
     189        inputs={'repository':'glue.badc.rl.ac.uk','uri':testURI,'format':'original','type':'xml','original':'1'} 
     190        ctype,r=retriever._present(inputs,'text/html') 
     191        d=DIF(r) 
     192        print d.entryID,[str(i) for i in d.services] 
     193 
    184194 
    185195if __name__=="__main__": 
Note: See TracChangeset for help on using the changeset viewer.