From: Sandrine Avakian Date: Mon, 5 Nov 2012 13:08:39 +0000 (+0100) Subject: Fixing bug in TestSuite (OAR). X-Git-Tag: sfa-2.1-24~3^2~40 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f40debc6010e3782345ff4e7ea6f56c2fac5459a;p=sfa.git Fixing bug in TestSuite (OAR). --- diff --git a/sfa/senslab/tests/TestSuite.py b/sfa/senslab/tests/TestSuite.py index 065c1664..afe83587 100644 --- a/sfa/senslab/tests/TestSuite.py +++ b/sfa/senslab/tests/TestSuite.py @@ -199,13 +199,14 @@ def get_stuff(oar, uri): def TestOAR(job_id = None): - - if isinstance(job_id,list) and len(job_id) == 1: - job_id = job_id[0] - - if job_id is None : - job_id = 1 + print "JOB_ID", job_id + if isinstance(job_id,list) : + if len(job_id) >= 1: + job_id = job_id[0] + else: + job_id = '1' + print "JOB_ID", job_id oar = OARrestapi() jobs = oar.parser.SendRequest("GET_reserved_nodes", username = 'avakian') print "\r\n OAR GET_reserved_nodes ",jobs