annotate Tests/CheckIngestTranscoding.py @ 625:78314ab6fc67

updated tests for auth plugin
author Alain Mazy <am@osimis.io>
date Thu, 15 Feb 2024 16:24:59 +0100
parents ec657d1a62a6
children 9f8276ac1cdd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
610
ec657d1a62a6 fix compatibility with python3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 546
diff changeset
1 #!/usr/bin/env python3
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Orthanc - A Lightweight, RESTful DICOM Store
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # Department, University Hospital of Liege, Belgium
511
933fe1bbce4f upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 449
diff changeset
6 # Copyright (C) 2017-2023 Osimis S.A., Belgium
933fe1bbce4f upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 449
diff changeset
7 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 #
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # This program is free software: you can redistribute it and/or
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # modify it under the terms of the GNU General Public License as
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # published by the Free Software Foundation, either version 3 of the
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # License, or (at your option) any later version.
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 #
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # This program is distributed in the hope that it will be useful, but
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # General Public License for more details.
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 #
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 # You should have received a copy of the GNU General Public License
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 import json
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 import os
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 import subprocess
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 import sys
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 import time
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 import Toolbox
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
29 import pprint
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 if len(sys.argv) < 2:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 print('Must provide a path to Orthanc binaries')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 exit(-1)
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 TMP = '/tmp/OrthancTest'
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 CONFIG = os.path.join(TMP, 'Configuration.json')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ORTHANC = Toolbox.DefineOrthanc()
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 if os.path.exists(TMP):
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 print('Temporary path already exists: %s' % TMP)
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 exit(-1)
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 os.mkdir(TMP)
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 def DropOrthanc():
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 while True:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 try:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 instances = Toolbox.DoGet(ORTHANC, '/instances')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 if len(instances) == 0:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 break
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 else:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 for i in instances:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 Toolbox.DoDelete(ORTHANC, '/instances/%s' % i)
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 except:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 time.sleep(0.05)
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 def TestTranscoding(config, tests):
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 with open(CONFIG, 'w') as f:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 f.write(json.dumps(config))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 process = subprocess.Popen(
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 sys.argv[1:] + [ CONFIG ],
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 cwd = TMP,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 #stdout=subprocess.PIPE,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 stderr=subprocess.PIPE,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 #shell=True
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 )
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 success = True
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 try:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 for test in tests:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 DropOrthanc()
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
78 print(test[0])
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 with open(Toolbox.GetDatabasePath(test[0]), 'rb') as f:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 Toolbox.DoPost(ORTHANC, '/instances', f.read(), 'application/dicom')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 instances = Toolbox.DoGet(ORTHANC, '/instances')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 if len(instances) != 1:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 print('BAD NUMBER OF INSTANCES')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 success = False
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 break
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 metadata = Toolbox.DoGet(ORTHANC, '/instances/%s/metadata?expand' % instances[0])
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 if not 'TransferSyntax' in metadata:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 print('NO METADATA')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 success = False
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 break
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 if metadata['TransferSyntax'] != test[1]:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 print('TRANSFER SYNTAX MISMATCH: %s vs %s' % (metadata['TransferSyntax'], test[1]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 success = False
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
97
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
98 if len(test) >= 3:
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
99 tags = Toolbox.DoGet(ORTHANC, "/instances/%s/tags?simplify" % instances[0])
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
100 if tags["PhotometricInterpretation"] != test[2]:
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
101 print('Invalid PhotometricInterpretation: %s' % tags["PhotometricInterpretation"])
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
102 success = False
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
103 break;
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
104 if len(test) >= 5:
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
105 resp, content = Toolbox.DoGetRaw(ORTHANC, "/instances/%s/frames/0/raw" % instances[0])
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
106 if resp['content-type'] != test[3]:
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
107 print('Invalid Content-Type: %s' % resp['content-type'])
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
108 success = False
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
109 if resp['content-length'] != str(test[4]):
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
110 print('Invalid Content-Length: %s' % resp['content-length'])
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
111 success = False
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
112 # pprint.pprint(resp)
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
113
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
114
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 except:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 success = False
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 process.terminate()
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 process.wait()
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 return success
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 def Assert(b):
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 if not b:
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 raise Exception('Bad result')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 print('==== TEST 1 ====') # No transcoding by default
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 Assert(TestTranscoding({ }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 ('TransferSyntaxes/1.2.840.10008.1.2.2.dcm', '1.2.840.10008.1.2.2'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
134 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.50', 'YBR_FULL_422', 'image/jpeg', 53476),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 print('==== TEST 2 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 'IngestTranscoding' : '1.2.840.10008.1.2.1',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ('TransferSyntaxes/1.2.840.10008.1.2.2.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.1'),
546
Alain Mazy <am@osimis.io>
parents: 545
diff changeset
144 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.1', 'RGB', 'application/octet-stream', 921600), # We expect YBR to become RGB with transcoding to raw
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 print('==== TEST 3 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 'IngestTranscoding' : '1.2.840.10008.1.2.1',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 'IngestTranscodingOfUncompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 'IngestTranscodingOfCompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 ('TransferSyntaxes/1.2.840.10008.1.2.2.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.1'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
156 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.1', 'RGB'), # We expect YBR to become RGB with transcoding to raw
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 print('==== TEST 4 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 'IngestTranscoding' : '1.2.840.10008.1.2.1',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 'IngestTranscodingOfUncompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 'IngestTranscodingOfCompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 ('TransferSyntaxes/1.2.840.10008.1.2.2.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
168 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.50', 'YBR_FULL_422'),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 print('==== TEST 5 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 'IngestTranscoding' : '1.2.840.10008.1.2.1',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 'IngestTranscodingOfUncompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 'IngestTranscodingOfCompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ('TransferSyntaxes/1.2.840.10008.1.2.2.dcm', '1.2.840.10008.1.2.2'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.1'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
180 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.1', 'RGB'), # We expect YBR to become RGB with transcoding to raw
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 print('==== TEST 6 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 'IngestTranscoding' : '1.2.840.10008.1.2.1',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 'IngestTranscodingOfUncompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 'IngestTranscodingOfCompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 ('TransferSyntaxes/1.2.840.10008.1.2.2.dcm', '1.2.840.10008.1.2.2'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
192 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.50', 'YBR_FULL_422'),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 print('==== TEST 7 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 'IngestTranscoding' : '1.2.840.10008.1.2.4.51',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 'IngestTranscodingOfUncompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 'IngestTranscodingOfCompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.4.51'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.51'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
204 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.51', 'YBR_FULL_422'),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 print('==== TEST 8 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 'IngestTranscoding' : '1.2.840.10008.1.2.4.51',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 'IngestTranscodingOfUncompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 'IngestTranscodingOfCompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.4.51'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.57'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
216 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.50', 'YBR_FULL_422'),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 print('==== TEST 9 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 'IngestTranscoding' : '1.2.840.10008.1.2.4.51',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 'IngestTranscodingOfUncompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 'IngestTranscodingOfCompressed' : True,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.51'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
228 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.51', 'YBR_FULL_422'),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 print('==== TEST 10 ====')
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 Assert(TestTranscoding({
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 'IngestTranscoding' : '1.2.840.10008.1.2.4.51',
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 'IngestTranscodingOfUncompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 'IngestTranscodingOfCompressed' : False,
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 }, [
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 ('TransferSyntaxes/1.2.840.10008.1.2.1.dcm', '1.2.840.10008.1.2.1'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'),
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.57'),
541
d7f7b9af09ca new Transcoding tests
Alain Mazy <am@osimis.io>
parents: 511
diff changeset
240 ('TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm', '1.2.840.10008.1.2.4.50', 'YBR_FULL_422'),
370
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 ]))
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243
7eb5b86508b1 added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 print('Success!')