Mercurial > hg > orthanc-tests
comparison Plugins/DicomWeb/Run.py @ 229:a4804d3f7499 Orthanc-1.5.6
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 27 Feb 2019 15:43:10 +0100 |
parents | 84244277413b |
children | 8980bd19e31d |
comparison
equal
deleted
inserted
replaced
228:84244277413b | 229:a4804d3f7499 |
---|---|
433 | 433 |
434 url = b[0]['7FE00010']['BulkDataURI'] | 434 url = b[0]['7FE00010']['BulkDataURI'] |
435 self.assertTrue(url.startswith(prefix)) | 435 self.assertTrue(url.startswith(prefix)) |
436 | 436 |
437 p = DoGetMultipart(ORTHANC, url[len(prefix):]) | 437 p = DoGetMultipart(ORTHANC, url[len(prefix):]) |
438 print(p) | |
439 print(len(p)) | |
440 for i in len(p): | |
441 print(len(p[i])) | |
442 | 438 |
443 self.assertEqual(2, len(p)) # There are 2 fragments in this image | 439 self.assertEqual(2, len(p)) # There are 2 fragments in this image |
444 self.assertEqual(4, len(p[0])) | 440 self.assertEqual(4, len(p[0])) |
445 self.assertEqual(114486, len(p[1])) | 441 self.assertEqual(114486, len(p[1])) |
446 | 442 |
561 uri = url[len(prefix):] | 557 uri = url[len(prefix):] |
562 | 558 |
563 self.assertRaises(Exception, lambda: DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 0))) | 559 self.assertRaises(Exception, lambda: DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 0))) |
564 self.assertRaises(Exception, lambda: DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 2))) | 560 self.assertRaises(Exception, lambda: DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 2))) |
565 | 561 |
566 print('%s/frames/%d' % (uri, 1)) | |
567 b = DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 1)) | 562 b = DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 1)) |
568 self.assertEqual(1, len(b)) | 563 self.assertEqual(1, len(b)) |
569 self.assertEqual(256 * 256 * 2, len(b[0])) | 564 self.assertEqual(256 * 256 * 2, len(b[0])) |
570 | 565 |
571 c = DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 1), | 566 c = DoGetMultipart(ORTHANC, '%s/frames/%d' % (uri, 1), |