comparison Tests/Toolbox.py @ 174:d468cbe1b161

added tests for IncomingWorklistRequestFilter
author am@osimis.io
date Thu, 20 Sep 2018 11:51:34 +0200
parents ed3db6386587
children 8a2dd77d4035
comparison
equal deleted inserted replaced
173:ed3db6386587 174:d468cbe1b161
178 DoDelete(orthanc, '/exports') 178 DoDelete(orthanc, '/exports')
179 179
180 for s in DoGet(orthanc, '/patients'): 180 for s in DoGet(orthanc, '/patients'):
181 DoDelete(orthanc, '/patients/%s' % s) 181 DoDelete(orthanc, '/patients/%s' % s)
182 182
183 def InstallLuaScriptFromPath(orthanc, path):
184 with open(GetDatabasePath(path), 'r') as f:
185 InstallLuaScript(orthanc, f.read())
186
187 def InstallLuaScript(orthanc, script):
188 DoPost(orthanc, '/tools/execute-script', script, 'application/lua')
189
190 def UninstallLuaCallbacks(orthanc):
191 DoPost(orthanc, '/tools/execute-script', 'function OnStoredInstance() end', 'application/lua')
192 InstallLuaScriptFromPath(orthanc, 'Lua/TransferSyntaxEnable.lua')
193
194
183 def ComputeMD5(data): 195 def ComputeMD5(data):
184 m = hashlib.md5() 196 m = hashlib.md5()
185 m.update(data) 197 m.update(data)
186 return m.hexdigest() 198 return m.hexdigest()
187 199