X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2FtestXrn.py;h=bb751831cec38afb194bad619c019603d15731bb;hb=1ad73fcc7e39fc2dbf42e0de0e25b4d1178db517;hp=582ebe62ae27f40c06b348220112c9b95538b0a3;hpb=dd5f700e6e2f9969d7c37d3cef3c3624adffe3f5;p=sfa.git diff --git a/tests/testXrn.py b/tests/testXrn.py index 582ebe62..bb751831 100755 --- 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: - xrn=Xrn(hrn=h,type=t) + xrn=Xrn(h,type=t) 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) @@ -25,9 +25,9 @@ class TestXrn(unittest.TestCase): else: # could not figure how to use assertFails on object construction.. # with self.assertRaises(SfaAPIError): - # Xrn(hrn=h,type=t).get_urn() + # Xrn(h,type=t).get_urn() try: - Xrn(hrn=h,type=t).get_urn() + Xrn(h,type=t).get_urn() failure="Unexpectedly created Xrn object" except SfaAPIError: failure=False @@ -56,10 +56,10 @@ class TestXrn(unittest.TestCase): def test_hrn006(self): self.__hrn("plc.princeton.tmack", 'user', "urn:publicid:IDN+plc:princeton+user+tmack" ) - def test_hrn007(self): - # not providing a type is currently not supporte - self.__hrn("fake-pi1@onelab.eu",None, - None) +# def test_hrn007(self): +# # not providing a type is currently not supporte +# self.__hrn("fake-pi1@onelab.eu",None, +# None) def test_hrn008(self): self.__hrn("plc.princeton.planetlab1", 'node', "urn:publicid:IDN+plc:princeton+node+planetlab1" ) @@ -78,7 +78,7 @@ class TestXrn(unittest.TestCase): self.assertEqual(void.get_hrn(),'') self.assertEqual(void.get_type(),None) self.assertEqual(void.get_urn(),expected) - loop=Xrn(urn=expected) + loop=Xrn(xrn=expected) self.assertEqual(loop.get_hrn(),'') # xxx - this is not quite right as the first object has type None self.assertEqual(loop.get_type(),'') @@ -105,15 +105,15 @@ class TestXrn(unittest.TestCase): def test_login_base_001 (self): - xrn=PlXrn(hrn='ple.inria.omftest',type='slice') + xrn=PlXrn(xrn='ple.inria.omftest',type='slice') self.assertEqual(xrn.pl_login_base(),'inria') def test_slicename_001 (self): - xrn=PlXrn(hrn='ple.inria.omftest',type='slice') + xrn=PlXrn(xrn='ple.inria.omftest',type='slice') self.assertEqual(xrn.pl_slicename(),'inria_omftest') def test_authname_001 (self): - xrn=PlXrn(hrn='ple.inria.omftest',type='slice') + xrn=PlXrn(xrn='ple.inria.omftest',type='slice') self.assertEqual(xrn.pl_authname(),'inria')