# HG changeset patch # User Sebastien Jodogne # Date 1640359086 -3600 # Node ID 97fca09bf8491de976336a7068b9e50e463d6016 # Parent af57603438b379c9391e56373bb7b5a081abfc82 test ?full in attachments diff -r af57603438b3 -r 97fca09bf849 Tests/Tests.py --- 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)