@@ -170,10 +170,9 @@ def test_add_encryption_layer_post(self):
170170 }
171171 }, headers = {"Content-Type" : "application/json" })
172172
173- self .assertIn ("data" , response .data )
174- self .assertIn ("secret" , response .data ["data" ])
175- self .assertEqual (secret2 - secret1 , response .data ["data" ]["secret" ])
176- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
173+ self .assertIn ("data" , response )
174+ self .assertIn ("secret" , response ["data" ])
175+ self .assertEqual (secret2 - secret1 , response ["data" ]["secret" ])
177176
178177 def test_add_encryption_layer_delete (self ):
179178 secret1 = 394
@@ -187,18 +186,16 @@ def test_add_encryption_layer_delete(self):
187186 }
188187 }, headers = {"Content-Type" : "application/json" })
189188
190- self .assertEqual ("OK" , response .data )
191- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
189+ self .assertEqual ("OK" , response )
192190
193191 def test_add_encryption_layer_get (self ):
194192 test_client = MockApiClient ()
195193 to_test .add_encryption_layer (test_client , self ._json_config )
196194 response = MockService (test_client ).do_something_get (headers = {"Content-Type" : "application/json" })
197195
198- self .assertIn ("data" , response .data )
199- self .assertIn ("secret" , response .data ["data" ])
200- self .assertEqual ([53 , 84 , 75 ], response .data ["data" ]["secret" ])
201- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
196+ self .assertIn ("data" , response )
197+ self .assertIn ("secret" , response ["data" ])
198+ self .assertEqual ([53 , 84 , 75 ], response ["data" ]["secret" ])
202199
203200 def test_add_header_encryption_layer_post_no_oaep_algo (self ):
204201 self ._set_header_params_config ()
@@ -216,10 +213,9 @@ def test_add_header_encryption_layer_post_no_oaep_algo(self):
216213 "encryptedData" : {}
217214 }, headers = {"Content-Type" : "application/json" })
218215
219- self .assertIn ("data" , response .data )
220- self .assertIn ("secret" , response .data ["data" ])
221- self .assertEqual (secret2 - secret1 , response .data ["data" ]["secret" ])
222- self .assertDictEqual ({"Content-Type" : "application/json" , "x-oaep-digest" : "SHA256" }, response .getheaders ())
216+ self .assertIn ("data" , response )
217+ self .assertIn ("secret" , response ["data" ])
218+ self .assertEqual (secret2 - secret1 , response ["data" ]["secret" ])
223219
224220 def test_add_header_encryption_layer_post_no_cert_fingerprint (self ):
225221 self ._set_header_params_config ()
@@ -237,10 +233,9 @@ def test_add_header_encryption_layer_post_no_cert_fingerprint(self):
237233 "encryptedData" : {}
238234 }, headers = {"Content-Type" : "application/json" })
239235
240- self .assertIn ("data" , response .data )
241- self .assertIn ("secret" , response .data ["data" ])
242- self .assertEqual (secret2 - secret1 , response .data ["data" ]["secret" ])
243- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
236+ self .assertIn ("data" , response )
237+ self .assertIn ("secret" , response ["data" ])
238+ self .assertEqual (secret2 - secret1 , response ["data" ]["secret" ])
244239
245240 def test_add_header_encryption_layer_post_no_pubkey_fingerprint (self ):
246241 self ._set_header_params_config ()
@@ -258,10 +253,9 @@ def test_add_header_encryption_layer_post_no_pubkey_fingerprint(self):
258253 "encryptedData" : {}
259254 }, headers = {"Content-Type" : "application/json" })
260255
261- self .assertIn ("data" , response .data )
262- self .assertIn ("secret" , response .data ["data" ])
263- self .assertEqual (secret2 - secret1 , response .data ["data" ]["secret" ])
264- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
256+ self .assertIn ("data" , response )
257+ self .assertIn ("secret" , response ["data" ])
258+ self .assertEqual (secret2 - secret1 , response ["data" ]["secret" ])
265259
266260 def test_add_header_encryption_layer_no_iv (self ):
267261 self ._set_header_params_config ()
@@ -294,10 +288,9 @@ def test_add_header_encryption_layer_post(self):
294288 "encryptedData" : {}
295289 }, headers = {"Content-Type" : "application/json" })
296290
297- self .assertIn ("data" , response .data )
298- self .assertIn ("secret" , response .data ["data" ])
299- self .assertEqual (secret2 - secret1 , response .data ["data" ]["secret" ])
300- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
291+ self .assertIn ("data" , response )
292+ self .assertIn ("secret" , response ["data" ])
293+ self .assertEqual (secret2 - secret1 , response ["data" ]["secret" ])
301294
302295 def test_add_header_encryption_layer_delete (self ):
303296 self ._set_header_params_config ()
@@ -314,8 +307,7 @@ def test_add_header_encryption_layer_delete(self):
314307 "encryptedData" : {}
315308 }, headers = {"Content-Type" : "application/json" })
316309
317- self .assertEqual ("OK" , response .data )
318- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
310+ self .assertEqual ("OK" , response )
319311
320312 def test_add_header_encryption_layer_get (self ):
321313 self ._set_header_params_config ()
@@ -324,10 +316,9 @@ def test_add_header_encryption_layer_get(self):
324316 to_test .add_encryption_layer (test_client , self ._json_config )
325317 response = MockService (test_client ).do_something_get_use_headers (headers = {"Content-Type" : "application/json" })
326318
327- self .assertIn ("data" , response .data )
328- self .assertIn ("secret" , response .data ["data" ])
329- self .assertEqual ([53 , 84 , 75 ], response .data ["data" ]["secret" ])
330- self .assertDictEqual ({"Content-Type" : "application/json" }, response .getheaders ())
319+ self .assertIn ("data" , response )
320+ self .assertIn ("secret" , response ["data" ])
321+ self .assertEqual ([53 , 84 , 75 ], response ["data" ]["secret" ])
331322
332323 @patch ('client_encryption.api_encryption.__oauth_warn' )
333324 def test_add_encryption_layer_oauth_set (self , __oauth_warn ):
0 commit comments