git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f577eb7
)
updated test cases to match changes to utils
author
Scott Baker
<bakers@cs.arizona.edu>
Wed, 3 Sep 2008 16:54:07 +0000
(16:54 +0000)
committer
Scott Baker
<bakers@cs.arizona.edu>
Wed, 3 Sep 2008 16:54:07 +0000
(16:54 +0000)
tests/testHierarchy.py
patch
|
blob
|
history
diff --git
a/tests/testHierarchy.py
b/tests/testHierarchy.py
index
5262009
..
618c1cd
100644
(file)
--- a/
tests/testHierarchy.py
+++ b/
tests/testHierarchy.py
@@
-1,5
+1,6
@@
import unittest
import os
import unittest
import os
+from excep import *
from hierarchy import *
from config import *
from hierarchy import *
from config import *
@@
-21,7
+22,10
@@
class TestHierarchy(unittest.TestCase):
self.assertEqual(h.auth_exists(name), False)
self.assertEqual(h.auth_exists(name), False)
- auth_info = h.get_auth_info(name, can_create=True)
+ self.assertRaises(MissingAuthority, h.get_auth_info, name)
+
+ h.create_auth(name, create_parents=True)
+ auth_info = h.get_auth_info(name)
self.assert_(auth_info)
gid = auth_info.get_gid_object()
self.assert_(auth_info)
gid = auth_info.get_gid_object()
@@
-32,7
+36,7
@@
class TestHierarchy(unittest.TestCase):
self.assert_(gid)
# try to get it again, make sure it's still there
self.assert_(gid)
# try to get it again, make sure it's still there
- auth_info2 = h.get_auth_info(name
, can_create=False
)
+ auth_info2 = h.get_auth_info(name)
self.assert_(auth_info2)
gid = auth_info2.get_gid_object()
self.assert_(auth_info2)
gid = auth_info2.get_gid_object()