Mercurial > hg > orthanc-tests
changeset 562:a6fb40c2b722
merge
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 28 Jun 2023 16:44:21 +0200 |
parents | 2c809c605592 (diff) 2db7a9041507 (current diff) |
children | be69d6d8260c |
files | Plugins/DicomWeb/Run.py |
diffstat | 1 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/DicomWeb/Run.py Wed Jun 28 11:43:44 2023 +0200 +++ b/Plugins/DicomWeb/Run.py Wed Jun 28 16:44:21 2023 +0200 @@ -1709,21 +1709,22 @@ self.assertEqual(1, len(m)) self.assertEqual(studyUid, m[0]['0020000D']['Value'][0]) - # This fails on DICOMweb <= 1.13 because of the "; q=.2", - # since multiple accepts were not supported - # https://bugs.orthanc-server.com/show_bug.cgi?id=216 - m = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % studyUid, headers = { - 'accept': 'text/html, image/gif, image/jpeg, */*; q=.2, */*; q=.2' - }) - self.assertEqual(1, len(m)) - self.assertEqual(studyUid, m[0]['0020000D']['Value'][0]) + if IsPluginVersionAbove(ORTHANC, "dicom-web", 1, 13, 1) and IsOrthancVersionAbove(ORTHANC, 1, 12, 1): + # This fails on DICOMweb <= 1.13 because of the "; q=.2", + # since multiple accepts were not supported + # https://bugs.orthanc-server.com/show_bug.cgi?id=216 + m = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % studyUid, headers = { + 'accept': 'text/html, image/gif, image/jpeg, */*; q=.2, */*; q=.2' + }) + self.assertEqual(1, len(m)) + self.assertEqual(studyUid, m[0]['0020000D']['Value'][0]) - # This fails on Orthanc <= 1.12.0 because of the ";q=0.9" - m = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % studyUid, headers = { - 'accept': 'text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8' - }) - self.assertEqual(1, len(m)) - self.assertEqual(studyUid, m[0]['0020000D']['Value'][0]) + # This fails on Orthanc <= 1.12.0 because of the ";q=0.9" + m = DoGet(ORTHANC, '/dicom-web/studies/%s/metadata' % studyUid, headers = { + 'accept': 'text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8' + }) + self.assertEqual(1, len(m)) + self.assertEqual(studyUid, m[0]['0020000D']['Value'][0]) def test_accept_negotiation(self):