Mercurial > hg > orthanc-tests
annotate Tests/CheckIngestTranscoding.py @ 660:2f6686a3cd16
conditional test
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 24 Jun 2024 18:32:13 +0200 |
parents | 5d7b6e43ab7d |
children |
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 |
649
5d7b6e43ab7d
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
6 # Copyright (C) 2017-2023 Osimis S.A., Belgium |
5d7b6e43ab7d
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
7 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
640
9f8276ac1cdd
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
610
diff
changeset
|
8 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
370
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 # |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 # 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
|
11 # 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
|
12 # 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
|
13 # 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
|
14 # |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 # 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
|
16 # 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
|
17 # 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
|
18 # General Public License for more details. |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 # |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 # 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
|
21 # 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
|
22 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 import json |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 import os |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 import subprocess |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 import sys |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 import time |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 import Toolbox |
541 | 30 import pprint |
370
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 if len(sys.argv) < 2: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 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
|
34 exit(-1) |
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 TMP = '/tmp/OrthancTest' |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 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
|
39 ORTHANC = Toolbox.DefineOrthanc() |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 if os.path.exists(TMP): |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 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
|
43 exit(-1) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 os.mkdir(TMP) |
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 def DropOrthanc(): |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 while True: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 try: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 instances = Toolbox.DoGet(ORTHANC, '/instances') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 if len(instances) == 0: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 break |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 else: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 for i in instances: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 Toolbox.DoDelete(ORTHANC, '/instances/%s' % i) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 except: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 time.sleep(0.05) |
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 def TestTranscoding(config, tests): |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 with open(CONFIG, 'w') as f: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 f.write(json.dumps(config)) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 process = subprocess.Popen( |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 sys.argv[1:] + [ CONFIG ], |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 cwd = TMP, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 #stdout=subprocess.PIPE, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 stderr=subprocess.PIPE, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 #shell=True |
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 success = True |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 try: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 for test in tests: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 DropOrthanc() |
541 | 79 print(test[0]) |
370
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 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
|
81 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
|
82 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
83 instances = Toolbox.DoGet(ORTHANC, '/instances') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
84 if len(instances) != 1: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
85 print('BAD NUMBER OF INSTANCES') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
86 success = False |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
87 break |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
88 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
89 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
|
90 if not 'TransferSyntax' in metadata: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 print('NO METADATA') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 success = False |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
93 break |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 if metadata['TransferSyntax'] != test[1]: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 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
|
97 success = False |
541 | 98 |
99 if len(test) >= 3: | |
100 tags = Toolbox.DoGet(ORTHANC, "/instances/%s/tags?simplify" % instances[0]) | |
101 if tags["PhotometricInterpretation"] != test[2]: | |
102 print('Invalid PhotometricInterpretation: %s' % tags["PhotometricInterpretation"]) | |
103 success = False | |
104 break; | |
105 if len(test) >= 5: | |
106 resp, content = Toolbox.DoGetRaw(ORTHANC, "/instances/%s/frames/0/raw" % instances[0]) | |
107 if resp['content-type'] != test[3]: | |
108 print('Invalid Content-Type: %s' % resp['content-type']) | |
109 success = False | |
110 if resp['content-length'] != str(test[4]): | |
111 print('Invalid Content-Length: %s' % resp['content-length']) | |
112 success = False | |
113 # pprint.pprint(resp) | |
114 | |
115 | |
370
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 except: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 success = False |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 process.terminate() |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 process.wait() |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 return success |
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 def Assert(b): |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 if not b: |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
127 raise Exception('Bad result') |
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 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
|
131 Assert(TestTranscoding({ }, [ |
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.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
|
133 ('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
|
134 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'), |
541 | 135 ('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
|
136 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 print('==== TEST 2 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 '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
|
141 }, [ |
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.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
|
143 ('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
|
144 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.1'), |
546 | 145 ('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
|
146 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 print('==== TEST 3 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 '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
|
151 'IngestTranscodingOfUncompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 'IngestTranscodingOfCompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 }, [ |
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.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
|
155 ('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
|
156 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.1'), |
541 | 157 ('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
|
158 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
159 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
160 print('==== TEST 4 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
161 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
162 '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
|
163 'IngestTranscodingOfUncompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
164 'IngestTranscodingOfCompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
165 }, [ |
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.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
|
167 ('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
|
168 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'), |
541 | 169 ('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
|
170 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
171 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
172 print('==== TEST 5 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
173 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
174 '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
|
175 'IngestTranscodingOfUncompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
176 'IngestTranscodingOfCompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
177 }, [ |
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.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
|
179 ('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
|
180 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.1'), |
541 | 181 ('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
|
182 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
183 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
184 print('==== TEST 6 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
185 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
186 '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
|
187 'IngestTranscodingOfUncompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
188 'IngestTranscodingOfCompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
189 }, [ |
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.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
|
191 ('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
|
192 ('TransferSyntaxes/1.2.840.10008.1.2.4.51.dcm', '1.2.840.10008.1.2.4.51'), |
541 | 193 ('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
|
194 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
195 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
196 print('==== TEST 7 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
197 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
198 '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
|
199 'IngestTranscodingOfUncompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
200 'IngestTranscodingOfCompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
201 }, [ |
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.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
|
203 ('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
|
204 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.51'), |
541 | 205 ('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
|
206 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
207 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
208 print('==== TEST 8 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
209 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
210 '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
|
211 'IngestTranscodingOfUncompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
212 'IngestTranscodingOfCompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
213 }, [ |
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.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
|
215 ('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
|
216 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.57'), |
541 | 217 ('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
|
218 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
219 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
220 print('==== TEST 9 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
221 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
222 '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
|
223 'IngestTranscodingOfUncompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
224 'IngestTranscodingOfCompressed' : True, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
225 }, [ |
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.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
|
227 ('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
|
228 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.51'), |
541 | 229 ('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
|
230 ])) |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
231 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
232 print('==== TEST 10 ====') |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
233 Assert(TestTranscoding({ |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
234 '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
|
235 'IngestTranscodingOfUncompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
236 'IngestTranscodingOfCompressed' : False, |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
237 }, [ |
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.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
|
239 ('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
|
240 ('TransferSyntaxes/1.2.840.10008.1.2.4.57.dcm', '1.2.840.10008.1.2.4.57'), |
541 | 241 ('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
|
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 |
7eb5b86508b1
added Tests/CheckHttpServerSecurity.py and Tests/CheckIngestTranscoding.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
245 print('Success!') |