diff Tests/Tests.py @ 535:31f70bfd86a7

Fix orphan files remaining in storage when working with MaximumStorageSize
author Alain Mazy <am@osimis.io>
date Mon, 22 May 2023 15:01:53 +0200
parents c5291d97ed54
children 7a83a8f087c7
line wrap: on
line diff
--- a/Tests/Tests.py	Mon May 22 15:01:32 2023 +0200
+++ b/Tests/Tests.py	Mon May 22 15:01:53 2023 +0200
@@ -9585,3 +9585,8 @@
             self.assertTrue('15' in m)
             self.assertEqual(lastUpdate, m['7'])
             self.assertEqual(signature, m['15'])
+
+    def test_add_attachment_to_non_existing_resource(self):
+        if IsOrthancVersionAbove(_REMOTE, 1, 12, 1): # till 1.12.0, it returned a 200
+            (headers, body) = DoPutRaw(_REMOTE, '/instances/11111111-11111111-11111111-11111111-11111111/attachments/1025', 'hello')
+            self.assertEqual('404', headers['status'])