Ignore:
Timestamp:
20/11/08 15:36:44 (12 years ago)
Author:
cbyrom
Message:

Strip out code not relevant to MILK - mainly WCS and WMS stuff - also including the CSML server code + trackback code
Also tidy up structure of 'public' dir - setting up new 'style' dir and
centralising icons in icons dir + remove all unused icons, javascript and stylesheets.
Also strip out testcase code and populate new test directory structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/models/DIF.py

    r3842 r4469  
    22# renderEntity etc ... 
    33# 
    4 from Utilities import * 
    5 from geoUtilities import * 
     4from milk_server.lib.Utilities import * 
     5from milk_server.lib.geoUtilities import * 
    66from People2 import * 
    77from AccessControl import AccessControl 
     
    217217           f.close() 
    218218 
    219  
    220 import unittest 
    221  
    222 class TestCase(unittest.TestCase): 
    223     """ 
    224     """ 
    225  
    226     inputFile = 'examples/neodc.eg1.dif' 
    227     inputFile2= 'examples/bodc.eg2.edmed.dif' 
    228     inputFile2= 'examples/bodc.eg3.difChange.dif' 
    229     inputFile2= 'examples/ndg.noc.soton.ac.uk__DIF__NOCSDAT162.xml' 
    230     configFile= 'config/ndgDiscovery.config' 
    231      
    232     def setUp(self): 
    233         ''' Load example config and DIF files for testing ''' 
    234         from ndgUtils.xmlHandler2 import xmlHandler 
    235         x=xmlHandler(self.inputFile2) 
    236         self.dif=DIF(x.tree,et=1) 
    237         self.config=myConfig(self.configFile) 
    238  
    239     def testEntries(self): 
    240         ''' Testing the DIF object can be loaded and some key entries extracted ''' 
    241         print 'Entry ID [%s]'%self.dif.entryID 
    242         print 'Author [%s]'%self.dif.authors 
    243         print 'Abstract [%s]'%self.dif.abstract 
    244         print 'BBox [%s]'%self.dif.bbox.boxes 
    245      
    246     def testParameters(self): 
    247         ''' Testing obtaining parameters from an edmed dif in original format ''' 
    248         print 'Parameters %s'%self.dif.parameters 
    249          
    250     def testDifficult(self): 
    251         ''' Grab a test example from the internet and load it ''' 
    252         from ndgUtils import ndgRetrieve, xmlHandler2 
    253         #testURI='grid.bodc.nerc.ac.uk__DIF__EDMED1048008' 
    254         testURI='neodc.nerc.ac.uk__DIF__NEODC_NEXTMAP' 
    255         uri=ndgObject(testURI,config=self.config) 
    256         status,xml=ndgRetrieve(uri,self.config) 
    257         self.assertEqual(status,1) 
    258         xml=xmlHandler2.xmlHandler(xml,string=1) 
    259         d=DIF(xml.tree,et=1) 
    260         print d.entryID,[str(i) for i in d.services] 
    261  
    262  
    263 if __name__=="__main__": 
    264     unittest.main() 
    265  
    266          
    267          
     219         
Note: See TracChangeset for help on using the changeset viewer.