Ignore:
Timestamp:
18/02/09 11:33:18 (11 years ago)
Author:
cbyrom
Message:

Move generic 'httpify' method to utilities + adjust utilities method
to retrive default proxy to cope with standard formatting + set this
up on each call to urlopen - since different urls may use different
proxies + tidyup and extend test suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/unittests/models/test_ndgObject.py

    r4944 r4991  
    8383        self.assertEqual(tc.VALID_DISCOVERY_URL + '?format=xml', n.printableURL) 
    8484           
    85     def testGetAtom(self): 
    86         ''' Get an atom doc ''' 
    87         uri=tc.VALID_PROVIDER_ID + '__' + no.ATOM_DOC_TYPE + '__' + \ 
    88             tc.datasetID 
    89          
    90         self.utils = tu(tc.EXIST_DBCONFIG_FILE) 
    91         atom = self.utils.createAtomInEXist(tc.xmlString) 
    92         n=no(uri,self.config) 
    93         doc = n.get() 
    94         print "type: %s\ndata: --%s--" %(type(doc), doc) 
    95         self.assertNotEqual(doc.find(tc.datasetID), -1) 
    96         self.utils.deleteDoc(atom.getFullPath()) 
    97            
    98     def testGetInvalidAtom(self): 
    99         ''' Get an atom doc ''' 
    100         uri=tc.VALID_PROVIDER_ID + '__' + no.ATOM_DOC_TYPE + '__' + \ 
    101             tc.VALID_ATOM_DOC_ID + 'blah' 
    102         n=no(uri,self.config) 
    103         doc = n.get() 
    104         self.assertEqual(doc, 0) 
    105  
    10685    def testPMLuri(self): 
    10786        '''Make sure the pml uris work in ndg object ''' 
Note: See TracChangeset for help on using the changeset viewer.