source: exist/trunk/python/ndgUtils/test_ndgDirectory.py @ 3161

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/python/ndgUtils/test_ndgDirectory.py@3161
Revision 3161, 749 bytes checked in by lawrence, 12 years ago (diff)

Modifications to ndgDirectory to expose filenames, entries and both more easily

Line 
1from ndgDirectory import ndgDirectory
2
3import unittest
4
5class TestCase(unittest.TestCase):
6   
7    def setUp(self): 
8        tc='/db/discovery/original/DIF/badc.nerc.ac.uk'
9        host='glue.badc.rl.ac.uk'
10        self.ndgDir=ndgDirectory(tc,host,docType='DIF')
11   
12    def testDirectory(self):
13        ''' Test the ability to get members of a directory and the first one of them '''
14        print self.ndgDir.members
15        doc=self.ndgDir.get(self.ndgDir.members[0]['fileName'])
16        print doc
17       
18    def testCreationDates(self):
19        '''Test the creation information'''
20        print self.ndgDir.created()
21        print self.ndgDir.created(self.ndgDir.members[0]['fileName'])
22       
23
24if __name__=="__main__":
25    unittest.main()
Note: See TracBrowser for help on using the repository browser.