Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 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 | 09ebdee8eda2 |
comparison
equal
deleted
inserted
replaced
442:af57603438b3 | 443:97fca09bf849 |
---|---|
1235 | 1235 |
1236 if IsOrthancVersionAbove(_REMOTE, 1, 9, 1): | 1236 if IsOrthancVersionAbove(_REMOTE, 1, 9, 1): |
1237 if IsDicomUntilPixelDataStored(_REMOTE): | 1237 if IsDicomUntilPixelDataStored(_REMOTE): |
1238 self.assertEqual(2, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) | 1238 self.assertEqual(2, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) |
1239 self.assertTrue('dicom-until-pixel-data' in DoGet(_REMOTE, '/instances/%s/attachments' % instance)) | 1239 self.assertTrue('dicom-until-pixel-data' in DoGet(_REMOTE, '/instances/%s/attachments' % instance)) |
1240 | |
1241 # New in Orthanc 1.9.8 | |
1242 a = DoGet(_REMOTE, '/instances/%s/attachments?full' % instance) | |
1243 self.assertEqual(2, len(a)) | |
1244 self.assertEqual(1, a['dicom']) | |
1245 self.assertEqual(3, a['dicom-until-pixel-data']) | |
1246 | |
1240 else: | 1247 else: |
1241 self.assertEqual(1, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) | 1248 self.assertEqual(1, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) |
1249 | |
1250 # New in Orthanc 1.9.8 | |
1251 a = DoGet(_REMOTE, '/instances/%s/attachments?full' % instance) | |
1252 self.assertEqual(1, len(a)) | |
1253 self.assertEqual(1, a['dicom']) | |
1242 else: | 1254 else: |
1243 self.assertEqual(2, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) | 1255 self.assertEqual(2, len(DoGet(_REMOTE, '/instances/%s/attachments' % instance))) |
1244 self.assertTrue('dicom-as-json' in DoGet(_REMOTE, '/instances/%s/attachments' % instance)) | 1256 self.assertTrue('dicom-as-json' in DoGet(_REMOTE, '/instances/%s/attachments' % instance)) |
1257 | |
1258 # New in Orthanc 1.9.8 | |
1259 self.assertRaises(Exception, lambda: DoGet( | |
1260 _REMOTE, '/instances/%s/attachments?full' % instance)) | |
1245 | 1261 |
1246 self.assertRaises(Exception, lambda: DoPut(_REMOTE, '/patients/%s/attachments/22' % patient, 'hello')) | 1262 self.assertRaises(Exception, lambda: DoPut(_REMOTE, '/patients/%s/attachments/22' % patient, 'hello')) |
1247 hello = 'hellohellohellohellohellohellohellohellohello' | 1263 hello = 'hellohellohellohellohellohellohellohellohello' |
1248 DoPut(_REMOTE, '/patients/%s/attachments/1025' % patient, hello) | 1264 DoPut(_REMOTE, '/patients/%s/attachments/1025' % patient, hello) |
1249 self.assertEqual(int(DoGet(_REMOTE, '/patients/%s/statistics' % patient)['DiskSize']), | 1265 self.assertEqual(int(DoGet(_REMOTE, '/patients/%s/statistics' % patient)['DiskSize']), |