# HG changeset patch # User Sebastien Jodogne # Date 1539011771 -7200 # Node ID 911070f790e35da1ea213e730f8149fa752906f3 # Parent fcb0c14dadb8ae3d6ace075b88c6b291790ad5a9 more checks diff -r fcb0c14dadb8 -r 911070f790e3 Tests/Tests.py --- a/Tests/Tests.py Fri Oct 05 16:07:10 2018 +0200 +++ b/Tests/Tests.py Mon Oct 08 17:16:11 2018 +0200 @@ -3866,7 +3866,8 @@ 'Series' : [ t2 ], 'Replace' : { 'PatientName' : 'Hello' }, 'Remove' : [ 'ReferringPhysicianName' ], - 'KeepSource' : False + 'KeepSource' : False, + 'Asynchronous' : True })) self.assertNotEqual(None, job) @@ -3901,7 +3902,8 @@ job = MonitorJob2(_REMOTE, lambda: DoPost (_REMOTE, '/studies/%s/merge' % knee, { 'Resources' : [ brainix ], - 'KeepSource' : True + 'KeepSource' : True, + 'Synchronous' : False })) self.assertNotEqual(None, job) diff -r fcb0c14dadb8 -r 911070f790e3 Tests/Toolbox.py --- a/Tests/Toolbox.py Fri Oct 05 16:07:10 2018 +0200 +++ b/Tests/Toolbox.py Mon Oct 08 17:16:11 2018 +0200 @@ -249,13 +249,17 @@ def MonitorJob2(orthanc, func): # "func" is a lambda a = set(DoGet(orthanc, '/jobs')) - func() + job = func() b = set(DoGet(orthanc, '/jobs')) diff = list(b - a) if len(diff) != 1: print('No job was created!') return None + elif (not 'ID' in job or + diff[0] != job['ID']): + print('Mismatch in the job ID') + return None elif WaitJobDone(orthanc, diff[0]): return diff[0] else: