comparison Plugins/DicomWeb/Run.py @ 242:c6ffdd0ea04b

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Jun 2019 09:27:44 +0200
parents adc6372b8820
children 49cf8ed97a28
comparison
equal deleted inserted replaced
241:adc6372b8820 242:c6ffdd0ea04b
673 'Url': url, 673 'Url': url,
674 'HttpHeaders' : { 674 'HttpHeaders' : {
675 'Hello' : 'World' 675 'Hello' : 'World'
676 }, 676 },
677 'Username' : 'bob', 677 'Username' : 'bob',
678 'Password' : 'bob' 678 'Password' : 'password',
679 'UserProperty' : 'Test',
679 }) 680 })
680 681
681 l = DoGet(ORTHANC, '/dicom-web/servers') 682 l = DoGet(ORTHANC, '/dicom-web/servers')
682 self.assertEqual(2, len(l)) 683 self.assertEqual(2, len(l))
683 self.assertTrue('sample' in l) 684 self.assertTrue('sample' in l)
684 self.assertTrue('hello' in l) 685 self.assertTrue('hello' in l)
685 686
686 s = DoGet(ORTHANC, '/dicom-web/servers?expand') 687 s = DoGet(ORTHANC, '/dicom-web/servers?expand')
687 self.assertEqual(5, len(s['hello'])) 688 self.assertEqual(6, len(s['hello']))
688 self.assertEqual(url, s['hello']['Url']) 689 self.assertEqual(url, s['hello']['Url'])
689 self.assertEqual('bob', s['hello']['Username']) 690 self.assertEqual('bob', s['hello']['Username'])
690 self.assertEqual(None, s['hello']['Password']) 691 self.assertEqual(None, s['hello']['Password'])
691 self.assertFalse(s['hello']['Pkcs11']) 692 self.assertFalse(s['hello']['Pkcs11'])
692 self.assertEqual(1, len(s['hello']['HttpHeaders'])) 693 self.assertEqual(1, len(s['hello']['HttpHeaders']))
693 self.assertTrue('Hello' in s['hello']['HttpHeaders']) 694 self.assertTrue('Hello' in s['hello']['HttpHeaders'])
695 self.assertEqual('Test', s['hello']['UserProperty'])
694 696
695 DoDelete(ORTHANC, '/dicom-web/servers/hello') 697 DoDelete(ORTHANC, '/dicom-web/servers/hello')
696 698
697 try: 699 try:
698 print('\nStarting the tests...') 700 print('\nStarting the tests...')