Mercurial > hg > orthanc-tests
changeset 443:97fca09bf849
test ?full in attachments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 24 Dec 2021 16:18:06 +0100 |
parents | af57603438b3 |
children | dbe74add9a21 |
files | Tests/Tests.py |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Tests/Tests.py Tue Nov 30 10:33:47 2021 +0100 +++ b/Tests/Tests.py Fri Dec 24 16:18:06 2021 +0100 @@ -1237,12 +1237,28 @@ if IsDicomUntilPixelDataStored(_REMOTE): self.assertEqual(2, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) self.assertTrue('dicom-until-pixel-data' in DoGet(_REMOTE, '/instances/%s/attachments' % instance)) + + # New in Orthanc 1.9.8 + a = DoGet(_REMOTE, '/instances/%s/attachments?full' % instance) + self.assertEqual(2, len(a)) + self.assertEqual(1, a['dicom']) + self.assertEqual(3, a['dicom-until-pixel-data']) + else: self.assertEqual(1, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) + + # New in Orthanc 1.9.8 + a = DoGet(_REMOTE, '/instances/%s/attachments?full' % instance) + self.assertEqual(1, len(a)) + self.assertEqual(1, a['dicom']) else: self.assertEqual(2, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) self.assertTrue('dicom-as-json' in DoGet(_REMOTE, '/instances/%s/attachments' % instance)) + # New in Orthanc 1.9.8 + self.assertRaises(Exception, lambda: DoGet( + _REMOTE, '/instances/%s/attachments?full' % instance)) + self.assertRaises(Exception, lambda: DoPut(_REMOTE, '/patients/%s/attachments/22' % patient, 'hello')) hello = 'hellohellohellohellohellohellohellohellohello' DoPut(_REMOTE, '/patients/%s/attachments/1025' % patient, hello)