annotate GenerateConfigurationForTests.py @ 173:ed3db6386587

testing overwrite
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Sep 2018 15:26:17 +0200
parents b90e001d43bd
children fcb0c14dadb8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/usr/bin/python
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Orthanc - A Lightweight, RESTful DICOM Store
73
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 35
diff changeset
4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # Department, University Hospital of Liege, Belgium
130
50cd127e5330 upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 101
diff changeset
6 # Copyright (C) 2017-2018 Osimis S.A., Belgium
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 #
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # This program is free software: you can redistribute it and/or
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # modify it under the terms of the GNU General Public License as
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # published by the Free Software Foundation, either version 3 of the
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # License, or (at your option) any later version.
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 #
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful, but
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # General Public License for more details.
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 #
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 import argparse
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 import os
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 import re
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 import socket
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 import subprocess
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 import sys
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
28 import json
101
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
29 import urllib
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
30
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 ##
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 ## Parse the command-line arguments
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 ##
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 parser = argparse.ArgumentParser(description = 'Generate the configuration file for the ' +
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 'instance of Orthanc to be checked against the integration tests.')
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 parser.add_argument('--target',
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 default = 'IntegrationTestsConfiguration.json',
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 help = 'Configuration file to generate')
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 parser.add_argument('--force',
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 help = 'Overwrite the file even if it already exists',
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 action = 'store_true')
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
31
e07deb07289d path to plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
47 parser.add_argument('--plugins',
e07deb07289d path to plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
48 help = 'Add a path to a folder containing plugins')
e07deb07289d path to plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
49
82
91e2ed032f96 fix test
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
50 parser.add_argument('--dicom',
91e2ed032f96 fix test
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
51 type = int,
91e2ed032f96 fix test
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
52 default = 4242,
91e2ed032f96 fix test
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
53 help = 'DICOM port of the Orthanc server')
91e2ed032f96 fix test
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
54
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 args = parser.parse_args()
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 ##
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 ## Check whether the file can be overwritten
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 ##
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 if os.path.exists(args.target) and not args.force:
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 print("""
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 WARNING: The file %s will be overwritten!
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 Are you sure ["yes" to go on]?""" % args.target)
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 if sys.stdin.readline().strip() != 'yes':
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 print('Aborting...')
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 exit(0)
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 ##
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 ## Generate the configuration file
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 ##
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 # Retrieve the IP address of the localhost
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 ip = socket.gethostbyname(socket.gethostname())
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80
101
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
81
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
82 # Download the content of the default configuration file
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
83 with open(args.target, 'w') as f:
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
84 url = 'https://bitbucket.org/sjodogne/orthanc/raw/Orthanc-1.2.0/Resources/Configuration.json'
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
85 http = urllib.urlopen(url)
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
86 if http.getcode() != 200:
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
87 raise Exception('Cannot download: %s' % url)
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
88
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
89 f.write(http.read())
71bca28a4645 remove the dependency upon installing Orthanc to generate the default configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 100
diff changeset
90
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 with open(args.target, 'r') as f:
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
93 # Remove the C++-style comments
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
94 nocomment = re.sub('//.*$', '', f.read(), 0, re.MULTILINE)
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
95
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
96 # Remove the C-style comments
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
97 nocomment = re.sub('/\*.*?\*/', '', nocomment, 0, re.DOTALL | re.MULTILINE)
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
98
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
99 config = json.loads(nocomment)
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
92
dbcbffb889da test_findscu_encoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 90
diff changeset
101 del config['DefaultEncoding']
dbcbffb889da test_findscu_encoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 90
diff changeset
102
95
a807a4699eb4 testing of metadata SopClassUid
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 92
diff changeset
103 config['AllowFindSopClassesInStudy'] = False
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
104 config['AuthenticationEnabled'] = True
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
105 config['DicomAet'] = 'ORTHANC'
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
106 config['DicomAssociationCloseDelay'] = 0
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
107 config['DicomModalities'] = { 'orthanctest' : [ 'ORTHANCTEST', ip, 5001 ] }
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
108 config['DicomPort'] = args.dicom
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
109 config['HttpCompressionEnabled'] = False
139
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
110 config['LogExportedResources'] = True
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
111 config['OrthancPeers'] = { 'peer' : [ 'http://%s:%d/' % (ip, 5000), 'alice', 'orthanctest' ] }
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
112 config['RegisteredUsers'] = { 'alice' : 'orthanctest' }
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
113 config['RemoteAccessAllowed'] = True
173
ed3db6386587 testing overwrite
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 153
diff changeset
114 config['OverwriteInstances'] = True
88
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
115
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
116 config['Dictionary'] = {
90
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
117 '00e1,10c2' : [ 'UI', 'PET-CT Multi Modality Name', 1, 1, 'ELSCINT1' ],
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
118 '7053,1003' : [ 'ST', 'Original Image Filename', 1, 1, 'Philips PET Private Group' ]
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
119 }
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
88
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
121 config['DicomWeb'] = {
90
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
122 'Servers' : {
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
123 'sample' : [
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
124 'http://localhost:8042/dicom-web/',
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
125 'alice',
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
126 'orthanctest'
88
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
127 ]
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
128 }
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
129 }
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
130
90
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
131 config['Worklists'] = {
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
132 'Enable': True,
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
133 'Database': os.path.abspath(os.path.join(os.path.dirname(__file__), './Database/Worklists/Working')),
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
134 }
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
135
99
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
136 config['PostgreSQL'] = {
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
137 'EnableIndex' : True,
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
138 'EnableStorage' : True,
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
139 'Host' : 'localhost',
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
140 'Port' : 5432,
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
141 'Database' : 'orthanctest',
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
142 'Username' : 'postgres',
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
143 'Password' : 'postgres'
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
144 }
37430f7430e3 config to test the PostgreSQL plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 95
diff changeset
145
140
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
146 config['MySQL'] = {
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
147 'EnableIndex' : True,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
148 'EnableStorage' : True,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
149 'Host' : 'localhost',
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
150 'Port' : 3306,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
151 'Database' : 'orthanctest',
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
152 'Username' : 'root',
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
153 'Password' : 'root',
153
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 140
diff changeset
154 'UnixSocket' : '',
140
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
155 }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 139
diff changeset
156
90
afbac3eb28a5 integration tests of worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
157
88
47a3d6c08413 easier dicomweb setup
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 87
diff changeset
158
13
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 11
diff changeset
159 # Enable case-insensitive PN (the default on versions <= 0.8.6)
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
160 config['CaseSensitivePN'] = False
82
91e2ed032f96 fix test
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
161
31
e07deb07289d path to plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
162 if args.plugins != None:
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
163 config['Plugins'] = [ args.plugins ]
31
e07deb07289d path to plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 22
diff changeset
164
3
2dbba2e6aa4b reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 with open(args.target, 'wt') as f:
87
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
166 f.write(json.dumps(config, indent = True, sort_keys = True))
4b24faec842b test_reconstruct_json2 + test_private_tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 82
diff changeset
167 f.write('\n')