comparison Tests/Run.py @ 21:2a29bcff60a7

tests of image decoding
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 22 Jun 2015 14:14:37 +0200
parents 7b69a561f4d3
children cde1691838d3
comparison
equal deleted inserted replaced
20:f3d08a75a636 21:2a29bcff60a7
82 ## 82 ##
83 83
84 if args.docker: 84 if args.docker:
85 args.server = GetDockerHostAddress() 85 args.server = GetDockerHostAddress()
86 86
87 CONFIG = '/tmp/Configuration.json' 87 CONFIG = '/tmp/IntegrationTestsConfiguration.json'
88 subprocess.check_call([ 'Orthanc', '--config=%s' % CONFIG ]) 88 subprocess.check_call([ 'Orthanc', '--config=%s' % CONFIG ])
89 89
90 with open(CONFIG, 'rt') as f: 90 with open(CONFIG, 'rt') as f:
91 config = f.read() 91 config = f.read()
92 92
96 config = re.sub(r'("DicomPort"\s*:)\s*.*?,', r'\1 5001,', config) 96 config = re.sub(r'("DicomPort"\s*:)\s*.*?,', r'\1 5001,', config)
97 config = re.sub(r'("HttpPort"\s*:)\s*.*?,', r'\1 5000,', config) 97 config = re.sub(r'("HttpPort"\s*:)\s*.*?,', r'\1 5000,', config)
98 config = re.sub(r'("RemoteAccessAllowed"\s*:)\s*false', r'\1 true', config) 98 config = re.sub(r'("RemoteAccessAllowed"\s*:)\s*false', r'\1 true', config)
99 config = re.sub(r'("AuthenticationEnabled"\s*:)\s*false', r'\1 true', config) 99 config = re.sub(r'("AuthenticationEnabled"\s*:)\s*false', r'\1 true', config)
100 config = re.sub(r'("RegisteredUsers"\s*:)\s*{', r'\1 { "alice" : "orthanctest"', config) 100 config = re.sub(r'("RegisteredUsers"\s*:)\s*{', r'\1 { "alice" : "orthanctest"', config)
101 config = re.sub(r'("DicomAssociationCloseDelay"\s*:)\s*[0-9]*', r'\1 0', config)
101 config = re.sub(r'("DicomModalities"\s*:)\s*{', r'\1 { "orthanc" : [ "%s", "%s", "%s" ]' % 102 config = re.sub(r'("DicomModalities"\s*:)\s*{', r'\1 { "orthanc" : [ "%s", "%s", "%s" ]' %
102 (args.aet, args.server, args.dicom), config) 103 (args.aet, args.server, args.dicom), config)
103 104
104 with open(CONFIG, 'wt') as f: 105 with open(CONFIG, 'wt') as f:
105 f.write(config) 106 f.write(config)