Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 595:b6c1f0c9ca15
fix test_error_codes_content_type
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 18 Dec 2023 22:27:04 +0100 |
parents | 3cb7c6162c77 |
children | 75244cf58a6d |
comparison
equal
deleted
inserted
replaced
594:27be80b4b1a9 | 595:b6c1f0c9ca15 |
---|---|
10030 # from 1.12.2, check that a ContentType header is included in errors with an error description (ex: 404) | 10030 # from 1.12.2, check that a ContentType header is included in errors with an error description (ex: 404) |
10031 (headers, body) = DoGetRaw(_REMOTE, '/rnm94%3Cscript%3Ealert(1)%3C/script%3Ejdtkc/explorer.html') | 10031 (headers, body) = DoGetRaw(_REMOTE, '/rnm94%3Cscript%3Ealert(1)%3C/script%3Ejdtkc/explorer.html') |
10032 self.assertEqual('404', headers['status']) | 10032 self.assertEqual('404', headers['status']) |
10033 | 10033 |
10034 if IsOrthancVersionAbove(_REMOTE, 1, 12, 2): | 10034 if IsOrthancVersionAbove(_REMOTE, 1, 12, 2): |
10035 self.assertEqual('application/json', headers['content-type']) | 10035 self.assertEqual('text/plain', headers['content-type']) |
10036 | 10036 |
10037 (headers, body) = DoPutRaw(_REMOTE, '/system', 'hello') | 10037 (headers, body) = DoPutRaw(_REMOTE, '/system', 'hello') |
10038 self.assertEqual('405', headers['status']) | 10038 self.assertEqual('405', headers['status']) |
10039 # when there is no body, there is no content-type | 10039 # when there is no body, there is no content-type |
10040 self.assertNotIn('content-type', headers) | 10040 self.assertNotIn('content-type', headers) |