Mercurial > hg > orthanc-tests
diff Tests/Tests.py @ 517:692f2956ddab
test HasLabels in /system
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Apr 2023 10:01:59 +0200 |
parents | 3a8e4de5aff7 |
children | 43a323de0b02 |
line wrap: on
line diff
--- a/Tests/Tests.py Tue Apr 04 12:09:00 2023 +0200 +++ b/Tests/Tests.py Wed Apr 05 10:01:59 2023 +0200 @@ -9331,7 +9331,8 @@ self.assertEqual(changes1[0], changes2[0]) def test_labels(self): - if IsOrthancVersionAbove(_REMOTE, 1, 12, 0): + if (IsOrthancVersionAbove(_REMOTE, 1, 12, 0) and + DoGet(_REMOTE, '/system') ['HasLabels']): u = UploadInstance(_REMOTE, 'DummyCT.dcm')['ID'] patient = DoGet(_REMOTE, '/instances/%s/patient' % u) ['ID'] study = DoGet(_REMOTE, '/instances/%s/study' % u) ['ID'] @@ -9351,4 +9352,5 @@ self.assertEqual('', DoDelete(_REMOTE, '%s/labels/hello' % base)) self.assertEqual(0, len(DoGet(_REMOTE, base) ['Labels'])) self.assertRaises(Exception, lambda: DoGet(_REMOTE, '%s/labels/hello' % base)) - + else: + print("Your database backend doesn't support labels")