# HG changeset patch # User Sebastien Jodogne # Date 1500040644 -7200 # Node ID 7ecd26982dd7f05b7e1a60065e76b4ef337cea60 # Parent a954c535fef61be2d4da327f4e65f51a2f50cd69 fix diff -r a954c535fef6 -r 7ecd26982dd7 Tests/Tests.py --- a/Tests/Tests.py Fri Jul 14 11:43:16 2017 +0200 +++ b/Tests/Tests.py Fri Jul 14 15:57:24 2017 +0200 @@ -1634,7 +1634,10 @@ def test_shanon(self): def Anonymize(instance, replacements = {}): - return DoPost(_REMOTE, '/instances/%s/anonymize' % instance, { 'Replace' : replacements }, 'application/json') + return DoPost(_REMOTE, '/instances/%s/anonymize' % instance, { + 'Replace' : replacements, + 'Force' : True, + }, 'application/json') self.assertEqual(0, len(DoGet(_REMOTE, '/instances'))) u = UploadInstance(_REMOTE, 'DummyCT.dcm')['ID'] @@ -1684,7 +1687,10 @@ def test_shanon_2(self): def Modify(instance, replacements = {}): - return DoPost(_REMOTE, '/instances/%s/modify' % instance, { 'Replace' : replacements }, 'application/json') + return DoPost(_REMOTE, '/instances/%s/modify' % instance, { + 'Replace' : replacements, + 'Force': True, + }, 'application/json') self.assertEqual(0, len(DoGet(_REMOTE, '/instances'))) u = UploadInstance(_REMOTE, 'DummyCT.dcm')['ID'] @@ -3115,7 +3121,8 @@ "SOPClassUID" : "test", "SOPInstanceUID" : "myid", }, - "Keep" : [ "StudyInstanceUID", "SeriesInstanceUID" ] + "Keep" : [ "StudyInstanceUID", "SeriesInstanceUID" ], + "Force" : True }) instances = DoGet(_REMOTE, '/instances/') @@ -3192,7 +3199,7 @@ UploadInstance(_REMOTE, 'Issue42.dcm')['ID'] modified = DoPost(_REMOTE, '/patients/da128605-e040d0c4-310615d2-3475da63-df2d1ef4/modify', - '{"Replace":{"PatientID":"Hello","PatientName":"Sample patient name"}}', + '{"Replace":{"PatientID":"Hello","PatientName":"Sample patient name"},"Force":true}', 'application/json') self.assertTrue('PatientID' in modified)