comparison Tests/Tests.py @ 543:8722f7f95a38

fix
author Alain Mazy <am@osimis.io>
date Tue, 20 Jun 2023 17:24:56 +0200
parents ea1003982c27
children 7de5fd295025
comparison
equal deleted inserted replaced
542:3f8eebe85c37 543:8722f7f95a38
6735 ], env = env) 6735 ], env = env)
6736 6736
6737 f1 = '/tmp/GETSCU/MR.1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114314079549' 6737 f1 = '/tmp/GETSCU/MR.1.3.46.670589.11.0.0.11.4.2.0.8743.5.5396.2006120114314079549'
6738 self.assertTrue(os.path.isfile(f1)) 6738 self.assertTrue(os.path.isfile(f1))
6739 with open(f1, 'rb') as f: 6739 with open(f1, 'rb') as f:
6740 self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax(f.read())) 6740 self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax(f.read(), encoding='ISO-8859-1'))
6741 6741
6742 CleanTarget() 6742 CleanTarget()
6743 6743
6744 # transcoding required 6744 # transcoding required
6745 UploadInstance(_REMOTE, 'TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm') 6745 UploadInstance(_REMOTE, 'TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm')
6755 '--output-directory', '/tmp/GETSCU/' 6755 '--output-directory', '/tmp/GETSCU/'
6756 ], env = env) 6756 ], env = env)
6757 6757
6758 self.assertTrue(os.path.isfile(f1)) 6758 self.assertTrue(os.path.isfile(f1))
6759 with open(f1, 'rb') as f: 6759 with open(f1, 'rb') as f:
6760 self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax(f.read())) 6760 self.assertEqual('1.2.840.10008.1.2.1', GetTransferSyntax(f.read(), encoding='ISO-8859-1'))
6761 6761
6762 # This file is transcoded from "1.2.840.10008.1.2.4.50" to "1.2.840.10008.1.2.1" 6762 # This file is transcoded from "1.2.840.10008.1.2.4.50" to "1.2.840.10008.1.2.1"
6763 # (LittleEndianExplicit is proposed by default by "getscu") 6763 # (LittleEndianExplicit is proposed by default by "getscu")
6764 f2 = '/tmp/GETSCU/US.1.2.840.113663.1298.1.3.715.20000329.1115326' 6764 f2 = '/tmp/GETSCU/US.1.2.840.113663.1298.1.3.715.20000329.1115326'
6765 self.assertTrue(os.path.isfile(f2)) 6765 self.assertTrue(os.path.isfile(f2))