Mercurial > hg > orthanc-tests
changeset 587:f29d3ff889bf
new test for /file?transcode=...
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 16 Nov 2023 16:12:15 +0100 |
parents | 4ee2cdbfc602 |
children | 8aa101e126d0 |
files | Tests/Tests.py |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Tests/Tests.py Tue Nov 14 14:30:00 2023 +0100 +++ b/Tests/Tests.py Thu Nov 16 16:12:15 2023 +0100 @@ -6431,6 +6431,17 @@ self.assertEqual('1.2.840.10008.1.2.4.57', GetTransferSyntax(z.read('IMAGES/IM0'))) + def test_download_file_transcode(self): + if IsOrthancVersionAbove(_REMOTE, 1, 12, 2): + + info = UploadInstance(_REMOTE, 'TransferSyntaxes/1.2.840.10008.1.2.1.dcm') + self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax( + DoGet(_REMOTE, '/instances/%s/file' % info['ID']))) + + self.assertEqual('1.2.840.10008.1.2.4.50', GetTransferSyntax( + DoGet(_REMOTE, '/instances/%s/file?transcode=1.2.840.10008.1.2.4.50' % info['ID']))) + + def test_modify_keep_source(self): # https://groups.google.com/d/msg/orthanc-users/CgU-Wg8vDio/BY5ZWcDEAgAJ i = UploadInstance(_REMOTE, 'DummyCT.dcm')