Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/exist/trunk/python/ndgUtils/test_ndgDirectory.py@3158
Revision 3158,
725 bytes
checked in by lawrence, 13 years ago
(diff) |
... and support for creation dates of objects as well ...
|
Line | |
---|
1 | from ndgDirectory import ndgDirectory |
---|
2 | |
---|
3 | import unittest |
---|
4 | |
---|
5 | class 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]) |
---|
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]) |
---|
22 | |
---|
23 | |
---|
24 | if __name__=="__main__": |
---|
25 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.