changeset 176:48cc188ffb09

strip trailing 0 char that appears with some findscu versions
author am@osimis.io
date Thu, 20 Sep 2018 12:35:32 +0200
parents 09ca519087a1
children ef6b791c6d62
files README Tests/Tests.py
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/README	Thu Sep 20 11:58:08 2018 +0200
+++ b/README	Thu Sep 20 12:35:32 2018 +0200
@@ -39,6 +39,10 @@
 
 # python ./Tests/Run.py
 
+to run a single test:
+
+# python Tests/Run.py Orthanc.test_findscu_counters
+
 To test the worklist plugin
 ---------------------------
 
--- a/Tests/Tests.py	Thu Sep 20 11:58:08 2018 +0200
+++ b/Tests/Tests.py	Thu Sep 20 12:35:32 2018 +0200
@@ -2878,7 +2878,7 @@
         i = CallFindScu([ '-k', '0008,0052=STUDY', '-k', 'SOPClassesInStudy' ])
         s = re.findall('\(0008,0062\).*?\[(.*?)\]', i)
         self.assertEqual(1, len(s))
-        t = map(lambda x: x.strip(), s[0].split('\\'))
+        t = map(lambda x: x.strip('\x00'), s[0].split('\\'))
         self.assertTrue('1.2.840.10008.5.1.4.1.1.2' in t)
         self.assertTrue('1.2.840.10008.5.1.4.1.1.128' in t)