Mercurial > hg > orthanc-tests
diff Tests/Toolbox.py @ 181:911070f790e3
more checks
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 17:16:11 +0200 |
parents | 8a2dd77d4035 |
children | 6ff9d035b26b |
line wrap: on
line diff
--- 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: