changeset 45:a8cc12e9b268

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Aug 2015 12:02:19 +0200
parents ffa542cce638
children 85b2e36ed392
files Tests/Tests.py
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Thu Aug 27 11:57:16 2015 +0200
+++ b/Tests/Tests.py	Thu Aug 27 12:02:19 2015 +0200
@@ -42,7 +42,7 @@
     with tempfile.NamedTemporaryFile(delete = True) as f:
         f.write(rawDicom)
         f.flush()
-        data = subprocess.check_output([ Toolbox.FindExecutable('dcm2xml'), f.name ])
+        data = subprocess.check_output([ FindExecutable('dcm2xml'), f.name ])
 
     result = []
     for tag in tags:
@@ -85,7 +85,7 @@
         DropOrthanc(_LOCAL)
         DropOrthanc(_REMOTE)
         UninstallLuaCallbacks()
-        print "In test", self._testMethodName
+        #print "In test", self._testMethodName
         
     def AssertSameImages(self, truth, url):
         im = GetImage(_REMOTE, url)
@@ -401,19 +401,19 @@
             pass
 
         z.extract('DICOMDIR', '/tmp')
-        a = subprocess.check_output([ Toolbox.FindExecutable('dciodvfy'), '/tmp/DICOMDIR' ],
+        a = subprocess.check_output([ FindExecutable('dciodvfy'), '/tmp/DICOMDIR' ],
                                     stderr = subprocess.STDOUT).split('\n')
         self.assertEqual(3, len(a))
         self.assertTrue(a[0].startswith('Warning'))
         self.assertEqual('BasicDirectory', a[1])
         self.assertEqual('', a[2])
 
-        a = subprocess.check_output([ Toolbox.FindExecutable('dcentvfy'), '/tmp/DICOMDIR' ],
+        a = subprocess.check_output([ FindExecutable('dcentvfy'), '/tmp/DICOMDIR' ],
                                     stderr = subprocess.STDOUT).split('\n')
         self.assertEqual(1, len(a))
         self.assertEqual('', a[0])
 
-        a = subprocess.check_output([ Toolbox.FindExecutable('dcm2xml'), '/tmp/DICOMDIR' ])
+        a = subprocess.check_output([ FindExecutable('dcm2xml'), '/tmp/DICOMDIR' ])
         self.assertTrue(re.search('1.3.46.670589.11.17521.5.0.3124.2008081908590448738', a) != None)
         self.assertTrue(re.search('1.3.46.670589.11.17521.5.0.3124.2008081909113806560', a) != None)
 
@@ -978,7 +978,7 @@
 
     def test_incoming_storescu(self):
         self.assertEqual(0, len(DoGet(_REMOTE, '/patients')))
-        subprocess.check_call([ Toolbox.FindExecutable('storescu'),
+        subprocess.check_call([ FindExecutable('storescu'),
                                 _REMOTE['Server'], str(_REMOTE['DicomPort']),
                                 GetDatabasePath('ColorTestImageJ.dcm') ])
         self.assertEqual(1, len(DoGet(_REMOTE, '/patients')))
@@ -986,7 +986,7 @@
 
     def test_incoming_findscu(self):
         def CallFindScu(args):
-            p = subprocess.Popen([ Toolbox.FindExecutable('findscu'), 
+            p = subprocess.Popen([ FindExecutable('findscu'), 
                                    '-P', '-aec', _REMOTE['DicomAet'], '-aet', _LOCAL['DicomAet'],
                                    _REMOTE['Server'], str(_REMOTE['DicomPort']) ] + args,
                                  stderr=subprocess.PIPE)
@@ -1019,7 +1019,7 @@
 
     def test_incoming_movescu(self):
         def CallMoveScu(args):
-            subprocess.check_call([ Toolbox.FindExecutable('movescu'), 
+            subprocess.check_call([ FindExecutable('movescu'), 
                                     '--move', _LOCAL['DicomAet'],      # Target AET (i.e. storescp)
                                     '--call', _REMOTE['DicomAet'],     # Called AET (i.e. Orthanc)
                                     '--aetitle', _LOCAL['DicomAet'],   # Calling AET (i.e. storescp)
@@ -1749,7 +1749,7 @@
         with tempfile.NamedTemporaryFile(delete = True) as f:
             f.write(DoGet(_LOCAL, '/instances/%s/file' % i[0]))
             f.flush()
-            routed = subprocess.check_output([ Toolbox.FindExecutable('dcm2xml'), f.name ])
+            routed = subprocess.check_output([ FindExecutable('dcm2xml'), f.name ])
             self.assertEqual('My Medical Device', re.search('"StationName">(.*?)<', routed).group(1).strip())
             self.assertEqual(None, re.search('"MilitaryRank"', routed))
             self.assertEqual(None, re.search('"0051,0010"', routed))  # A private tag
@@ -1843,7 +1843,7 @@
     def test_incoming_jpeg(self):
         def storescu():
             with open(os.devnull, 'w') as FNULL:
-                subprocess.check_call([ Toolbox.FindExecutable('storescu'), '-xs',
+                subprocess.check_call([ FindExecutable('storescu'), '-xs',
                                         _REMOTE['Server'], str(_REMOTE['DicomPort']),
                                         GetDatabasePath('Knix/Loc/IM-0001-0001.dcm') ],
                                       stderr = FNULL)