From f40debc6010e3782345ff4e7ea6f56c2fac5459a Mon Sep 17 00:00:00 2001 From: Sandrine Avakian Date: Mon, 5 Nov 2012 14:08:39 +0100 Subject: [PATCH] Fixing bug in TestSuite (OAR). --- sfa/senslab/tests/TestSuite.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 -- 2.43.0