Mercurial > hg > orthanc-tests
changeset 302:22b6dd0f8c84
test_modify_transcode_study
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 18 May 2020 21:37:39 +0200 |
parents | 6652d5720a45 |
children | cb56f56c98fb |
files | Tests/Tests.py |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Tests/Tests.py Mon May 18 19:07:47 2020 +0200 +++ b/Tests/Tests.py Mon May 18 21:37:39 2020 +0200 @@ -5516,7 +5516,7 @@ self.assertEqual('NORMAL', tags['1337,1001']['Value']) - def test_modify_transcode(self): + def test_modify_transcode_instance(self): i = UploadInstance(_REMOTE, 'KarstenHilbertRF.dcm')['ID'] self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax( DoGet(_REMOTE, '/instances/%s/file' % i))) @@ -5694,3 +5694,22 @@ self.assertEqual(1, len(s)) self.assertFalse(i['ParentStudy'] in s) self.assertTrue(j['ID'] in s) + + + def test_modify_transcode_study(self): + i = UploadInstance(_REMOTE, 'KarstenHilbertRF.dcm') + self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax( + DoGet(_REMOTE, '/instances/%s/file' % i['ID']))) + + self.assertEqual(1, len(DoGet(_REMOTE, '/instances'))) + j = DoPost(_REMOTE, '/studies/%s/modify' % i['ParentStudy'], { + 'Transcode' : '1.2.840.10008.1.2.4.50', + 'KeepSource' : False + }) + + k = DoGet(_REMOTE, '/instances') + self.assertEqual(1, len(k)) + self.assertEqual(i['ID'], DoGet(_REMOTE, '/instances/%s/metadata?expand' % k[0]) ['ModifiedFrom']) + self.assertEqual('1.2.840.10008.1.2.4.50', GetTransferSyntax( + DoGet(_REMOTE, '/instances/%s/file' % k[0]))) +