Mercurial > hg > orthanc-tests
diff Tests/Tests.py @ 337:ec13ace43bde
trying webdav tests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 10 Oct 2020 11:44:17 +0200 |
parents | 96718de2f29c |
children | 66a36befb208 |
line wrap: on
line diff
--- a/Tests/Tests.py Fri Sep 18 14:19:53 2020 +0200 +++ b/Tests/Tests.py Sat Oct 10 11:44:17 2020 +0200 @@ -6012,3 +6012,18 @@ i = CallFindScu([ '-k', '0008,0052=STUDY', '-k', '0020,000d=', '-k', '0008,0061=%s' % i ]) studyInstanceUid = re.findall('\(0020,000d\).*?\[(.*?)\]', i) self.assertEqual(expected, len(studyInstanceUid)) + + + def test_webdav(self): + self.assertRaises(Exception, lambda: DoPropFind(_REMOTE, '/webdav/', 2)) + + xml = DoPropFind(_REMOTE, '/webdav/', 1) + #print(xml.toprettyxml()) + for i in xml.getElementsByTagName('D:response'): + print(i.getElementsByTagName('D:href')[0].childNodes[0].data) + # print(i.getElementsByTagName('D:prop')[0].toprettyxml()) + + + + self.assertEqual(0, len(DoGet(_REMOTE, '/patients'))) + UploadInstance(_REMOTE, 'Comunix/Ct/IM-0001-0001.dcm')