Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 22:8f4b70c89467
readme
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 22 Jun 2015 16:29:08 +0200 |
parents | 2a29bcff60a7 |
children | 30ecc857fa07 |
comparison
equal
deleted
inserted
replaced
21:2a29bcff60a7 | 22:8f4b70c89467 |
---|---|
1 #!/usr/bin/env python | |
2 # -*- coding: utf-8 -*- | |
3 | |
4 | |
1 # Orthanc - A Lightweight, RESTful DICOM Store | 5 # Orthanc - A Lightweight, RESTful DICOM Store |
2 # Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics | 6 # Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics |
3 # Department, University Hospital of Liege, Belgium | 7 # Department, University Hospital of Liege, Belgium |
4 # | 8 # |
5 # This program is free software: you can redistribute it and/or | 9 # This program is free software: you can redistribute it and/or |
1963 tmp = map(lambda x: x - 65536 if x >= 32768 else x, truth.getdata()) | 1967 tmp = map(lambda x: x - 65536 if x >= 32768 else x, truth.getdata()) |
1964 tmp = map(lambda x: (255.0 * (x - minValue)) / (maxValue - minValue), tmp) | 1968 tmp = map(lambda x: (255.0 * (x - minValue)) / (maxValue - minValue), tmp) |
1965 self.AssertSameImages(tmp, '/instances/%s/preview' % signed) | 1969 self.AssertSameImages(tmp, '/instances/%s/preview' % signed) |
1966 | 1970 |
1967 self.assertEqual('b57e6c872a3da50877c7da689b03a444', ComputeMD5(DoGet(_REMOTE, '/instances/%s/matlab' % signed))) | 1971 self.assertEqual('b57e6c872a3da50877c7da689b03a444', ComputeMD5(DoGet(_REMOTE, '/instances/%s/matlab' % signed))) |
1972 | |
1973 | |
1974 def test_issue_32(self): | |
1975 f = UploadInstance(_REMOTE, 'Issue32.dcm')['ID'] | |
1976 tags = DoGet(_REMOTE, '/instances/%s/tags?simplify' % f) | |
1977 self.assertEqual(u'Рентгенография', tags['SeriesDescription']) | |
1978 self.assertEqual(u'Таз', tags['BodyPartExamined']) | |
1979 self.assertEqual(u'Прямая', tags['ViewPosition']) | |
1980 | |
1981 | |
1982 def test_encodings(self): | |
1983 brainix = UploadInstance(_REMOTE, 'Brainix/Epi/IM-0001-0001.dcm')['ID'] | |
1984 tags = DoGet(_REMOTE, '/instances/%s/tags?simplify' % brainix) | |
1985 self.assertEqual(u'IRM cérébrale, neuro-crâne', tags['StudyDescription']) |