# HG changeset patch # User Alain Mazy # Date 1644416947 -3600 # Node ID 09ebdee8eda2cb56ba4288e3411c3733622ad79f # Parent dbe74add9a21be7f97ac18a12eb53282a6d08cc8 added test for /attachments/../info diff -r dbe74add9a21 -r 09ebdee8eda2 README --- a/README Wed Feb 09 15:17:54 2022 +0100 +++ b/README Wed Feb 09 15:29:07 2022 +0100 @@ -122,6 +122,10 @@ # python ./Tests/Run.py +To run a single test with by fixing the Orthanc 0.8.6 executable path: +# python2 ./Tests/Run.py --orthanc /home/alain/Releases/Orthanc-0.8.6/Build/Orthanc Orthanc.test_peer_store_straight + + Use the flag "--help" to get the full list of arguments. These arguments will notably allow you to specify the network parameters of your remote instance of Orthanc. @@ -144,7 +148,7 @@ may specify them when starting the test as shown below # bash -# python Tests/Run.py --force --dicom 8567 --rest 8568 +# python2 Tests/Run.py --force --dicom 4242 --rest 8042 --orthanc /home/alain/Releases/Orthanc-0.8.6/Build/Orthanc Orthanc.test_peer_store_straight Note that you will have to install Linux prerequisites under WSL and the orthanc package as well. diff -r dbe74add9a21 -r 09ebdee8eda2 Tests/Run.py --- a/Tests/Run.py Wed Feb 09 15:17:54 2022 +0100 +++ b/Tests/Run.py Wed Feb 09 15:29:07 2022 +0100 @@ -126,6 +126,8 @@ ]) +print "toto" + LOCAL = DefineOrthanc(aet = 'ORTHANCTEST', server = 'localhost', dicomPort = 5001, diff -r dbe74add9a21 -r 09ebdee8eda2 Tests/Tests.py --- a/Tests/Tests.py Wed Feb 09 15:17:54 2022 +0100 +++ b/Tests/Tests.py Wed Feb 09 15:29:07 2022 +0100 @@ -244,7 +244,14 @@ else: self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/instances/%s/attachments/dicom-until-pixel-data' % instance)) j = int(DoGet(_REMOTE, '/instances/%s/attachments/dicom-as-json/size' % instance)) - + + if IsOrthancVersionAbove(_REMOTE, 1, 10, 0): + attachmentInfo = DoGet(_REMOTE, '/instances/%s/attachments/dicom/info' % instance) + self.assertEqual(sizeDummyCT, attachmentInfo['CompressedSize']) + self.assertEqual(sizeDummyCT, attachmentInfo['UncompressedSize']) + self.assertIn('Uuid', attachmentInfo) + self.assertEqual(1, attachmentInfo['ContentType']) + s = sizeDummyCT + j if isCompressed: