# HG changeset patch # User Sebastien Jodogne # Date 1613066759 -3600 # Node ID a4b8450a1158211420ed84d5ba0accfad2ec91d6 # Parent cc79fa4945da60f1def43443283a78a2f175bb3f fix test_storescu_transcoding diff -r cc79fa4945da -r a4b8450a1158 Tests/Run.py --- a/Tests/Run.py Thu Feb 04 15:31:11 2021 +0100 +++ b/Tests/Run.py Thu Feb 11 19:05:59 2021 +0100 @@ -158,6 +158,17 @@ print('\nStarting the tests...') SetOrthancParameters(LOCAL, REMOTE, args.docker) + # Change the order of the tests + # https://stackoverflow.com/a/4006044/881731 + # https://stackoverflow.com/a/54923706/881731 + + # Reverse order + # unittest.TestLoader.sortTestMethodsUsing = lambda _, x, y: cmp(y, x) + + # import random + # random.seed(25) + # unittest.TestLoader.sortTestMethodsUsing = lambda self, a, b: random.choice([1, 0, -1]) + unittest.main(argv = [ sys.argv[0] ] + args.options) diff -r cc79fa4945da -r a4b8450a1158 Tests/Tests.py --- a/Tests/Tests.py Thu Feb 04 15:31:11 2021 +0100 +++ b/Tests/Tests.py Thu Feb 11 19:05:59 2021 +0100 @@ -2980,6 +2980,13 @@ t = DoGet(_REMOTE, '/instances/%s/tags' % j) with open(GetDatabasePath('PrivateTagsFull.json'), 'r') as f: a = json.loads(f.read()) + + # Starting with Orthanc 1.9.1, the DICOM-as-JSON + # attachments are truncated starting with PixelData + if not '7fe1,0010' in t: + del a['7fe1,0010'] + del a['7fe1,1001'] + aa = json.dumps(a).replace('2e+022', '2e+22') tt = (json.dumps(t) .replace('2e+022', '2e+22') @@ -5610,6 +5617,7 @@ params['AllowTranscoding'] = False DoPut(_REMOTE, '/modalities/toto', params) self.assertRaises(Exception, lambda: DoPost(_REMOTE, '/modalities/toto/store', str(i), 'text/plain')) + DoDelete(_REMOTE, '/modalities/toto') def test_bitbucket_issue_169(self):