git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Xrn object is initialized with a single non-optional xrn string. hrn/urn is detecte...
[sfa.git]
/
tests
/
testXrn.py
diff --git
a/tests/testXrn.py
b/tests/testXrn.py
index
9725652
..
58aa763
100755
(executable)
--- a/
tests/testXrn.py
+++ b/
tests/testXrn.py
@@
-13,10
+13,10
@@
class TestXrn(unittest.TestCase):
def __hrn(self,h,t,exp_urn):
if verbose: print 'testing (',h,t,') expecting',exp_urn
if exp_urn:
def __hrn(self,h,t,exp_urn):
if verbose: print 'testing (',h,t,') expecting',exp_urn
if exp_urn:
- xrn=Xrn(h
rn=h
,type=t)
+ xrn=Xrn(h,type=t)
if verbose: print xrn.dump_string()
urn=xrn.get_urn()
if verbose: print xrn.dump_string()
urn=xrn.get_urn()
- (h1,t1) = Xrn(urn
=urn
).get_hrn_type()
+ (h1,t1) = Xrn(urn).get_hrn_type()
if h1!=h or t1!=t or urn!=exp_urn:
print "hrn->urn->hrn : MISMATCH with in=(%s,%s) -- out=(%s,%s) -- urn=%s"%(h,t,h1,t1,urn)
self.assertEqual(h1,h)
if h1!=h or t1!=t or urn!=exp_urn:
print "hrn->urn->hrn : MISMATCH with in=(%s,%s) -- out=(%s,%s) -- urn=%s"%(h,t,h1,t1,urn)
self.assertEqual(h1,h)
@@
-25,9
+25,9
@@
class TestXrn(unittest.TestCase):
else:
# could not figure how to use assertFails on object construction..
# with self.assertRaises(SfaAPIError):
else:
# could not figure how to use assertFails on object construction..
# with self.assertRaises(SfaAPIError):
- # Xrn(h
rn=h
,type=t).get_urn()
+ # Xrn(h,type=t).get_urn()
try:
try:
- Xrn(h
rn=h
,type=t).get_urn()
+ Xrn(h,type=t).get_urn()
failure="Unexpectedly created Xrn object"
except SfaAPIError:
failure=False
failure="Unexpectedly created Xrn object"
except SfaAPIError:
failure=False
@@
-93,15
+93,15
@@
class TestXrn(unittest.TestCase):
def test_login_base_001 (self):
def test_login_base_001 (self):
- xrn=PlXrn(
h
rn='ple.inria.omftest',type='slice')
- self.assertEqual(xrn.login_base(),'inria')
+ xrn=PlXrn(
x
rn='ple.inria.omftest',type='slice')
+ self.assertEqual(xrn.
pl_
login_base(),'inria')
def test_slicename_001 (self):
def test_slicename_001 (self):
- xrn=PlXrn(
h
rn='ple.inria.omftest',type='slice')
- self.assertEqual(xrn.slicename(),'inria_omftest')
+ xrn=PlXrn(
x
rn='ple.inria.omftest',type='slice')
+ self.assertEqual(xrn.
pl_
slicename(),'inria_omftest')
def test_authname_001 (self):
def test_authname_001 (self):
- xrn=PlXrn(
h
rn='ple.inria.omftest',type='slice')
- self.assertEqual(xrn.authname(),'inria')
+ xrn=PlXrn(
x
rn='ple.inria.omftest',type='slice')
+ self.assertEqual(xrn.
pl_
authname(),'inria')