@@ -272,23 +272,23 @@ def test_reduce_boolean_removes_enabled(self, fake_vs):
272272 fake_vs .create (partition = "Common" , name = "test_create" , enabled = False )
273273 session = fake_vs ._meta_data ['bigip' ]._meta_data ['icr_session' ]
274274 pos , kwargs = session .post .call_args
275- assert kwargs [ 'json' ][ 'disabled' ] is True
276- assert 'enabled' not in kwargs ['json ' ]
275+ assert '"disabled": true' in kwargs [ 'data' ]
276+ assert 'enabled' not in kwargs ['data ' ]
277277
278278 def test_reduce_boolean_removes_disabled (self , fake_vs ):
279279 fake_vs .create (partition = 'Common' , name = 'test_create' ,
280280 disabled = False )
281281 session = fake_vs ._meta_data ['bigip' ]._meta_data ['icr_session' ]
282282 pos , kwargs = session .post .call_args
283- assert kwargs [ 'json' ][ 'enabled' ] is True
284- assert 'disabled' not in kwargs ['json ' ]
283+ assert '"enabled": true' in kwargs [ 'data' ]
284+ assert 'disabled' not in kwargs ['data ' ]
285285
286286 def test_reduce_boolean_removes_nothing (self , fake_vs ):
287287 fake_vs .create (partition = 'Common' , name = 'test_create' , enabled = True )
288288 session = fake_vs ._meta_data ['bigip' ]._meta_data ['icr_session' ]
289289 pos , kwargs = session .post .call_args
290- assert kwargs [ 'json' ][ 'enabled' ] is True
291- assert 'disabled' not in kwargs ['json ' ]
290+ assert '"enabled": true' in kwargs [ 'data' ]
291+ assert 'disabled' not in kwargs ['data ' ]
292292
293293 def test_reduce_boolean_same_value (self , fake_vs ):
294294 with pytest .raises (ExclusiveAttributesPresent ) as ex :
@@ -423,7 +423,7 @@ def test_Collection_removal(self):
423423 assert 'contained' in r .__dict__
424424 r .update (a = "b" )
425425 submitted = r ._meta_data ['bigip' ]. \
426- _meta_data ['icr_session' ].put .call_args [1 ]['json ' ]
426+ _meta_data ['icr_session' ].put .call_args [1 ]['data ' ]
427427 assert 'contained' not in submitted
428428
429429 def test_read_only_removal (self ):
@@ -440,29 +440,29 @@ def test_read_only_removal(self):
440440 assert 'READONLY' in r .__dict__
441441 r .update (a = "b" )
442442 submitted = r ._meta_data ['bigip' ].\
443- _meta_data ['icr_session' ].put .call_args [1 ]['json ' ]
443+ _meta_data ['icr_session' ].put .call_args [1 ]['data ' ]
444444 assert 'READONLY' not in submitted
445445
446446 def test_reduce_boolean_removes_enabled (self , fake_rsrc ):
447447 fake_rsrc .update (enabled = False )
448448 pos , kwargs = fake_rsrc ._meta_data ['bigip' ].\
449449 _meta_data ['icr_session' ].put .call_args
450- assert kwargs [ 'json' ][ 'disabled' ] is True
451- assert 'enabled' not in kwargs ['json ' ]
450+ assert '"disabled": true' in kwargs [ 'data' ]
451+ assert 'enabled' not in kwargs ['data ' ]
452452
453453 def test_reduce_boolean_removes_disabled (self , fake_rsrc ):
454454 fake_rsrc .update (disabled = False )
455455 pos , kwargs = fake_rsrc ._meta_data ['bigip' ].\
456456 _meta_data ['icr_session' ].put .call_args
457- assert kwargs [ 'json' ][ 'enabled' ] is True
458- assert 'disabled' not in kwargs ['json ' ]
457+ assert '"enabled": true' in kwargs [ 'data' ]
458+ assert 'disabled' not in kwargs ['data ' ]
459459
460460 def test_reduce_boolean_removes_nothing (self , fake_rsrc ):
461461 fake_rsrc .update (partition = 'Common' , name = 'test_create' , enabled = True )
462462 pos , kwargs = fake_rsrc ._meta_data ['bigip' ].\
463463 _meta_data ['icr_session' ].put .call_args
464- assert kwargs [ 'json' ][ 'enabled' ] is True
465- assert 'disabled' not in kwargs ['json ' ]
464+ assert '"enabled": true' in kwargs [ 'data' ]
465+ assert 'disabled' not in kwargs ['data ' ]
466466
467467 def test_reduce_boolean_same_value (self , fake_rsrc ):
468468 with pytest .raises (BooleansToReduceHaveSameValue ) as ex :
@@ -506,7 +506,7 @@ def test_Collection_removal(self):
506506 assert 'contained' in r .__dict__
507507 r .modify (a = "b" )
508508 submitted = r ._meta_data ['bigip' ]. \
509- _meta_data ['icr_session' ].patch .call_args [1 ]['json ' ]
509+ _meta_data ['icr_session' ].patch .call_args [1 ]['data ' ]
510510
511511 assert 'contained' not in submitted
512512
@@ -528,22 +528,22 @@ def test_reduce_boolean_removes_enabled(self, fake_rsrc):
528528 fake_rsrc .modify (enabled = False )
529529 pos , kwargs = fake_rsrc ._meta_data ['bigip' ].\
530530 _meta_data ['icr_session' ].patch .call_args
531- assert kwargs [ 'json' ][ 'disabled' ] is True
532- assert 'enabled' not in kwargs ['json ' ]
531+ assert '"disabled": true' in kwargs [ 'data' ]
532+ assert 'enabled' not in kwargs ['data ' ]
533533
534534 def test_reduce_boolean_removes_disabled (self , fake_rsrc ):
535535 fake_rsrc .modify (disabled = False )
536536 pos , kwargs = fake_rsrc ._meta_data ['bigip' ].\
537537 _meta_data ['icr_session' ].patch .call_args
538- assert kwargs [ 'json' ][ 'enabled' ] is True
539- assert 'disabled' not in kwargs ['json ' ]
538+ assert '"enabled": true' in kwargs [ 'data' ]
539+ assert 'disabled' not in kwargs ['data ' ]
540540
541541 def test_reduce_boolean_removes_nothing (self , fake_rsrc ):
542542 fake_rsrc .modify (partition = 'Common' , name = 'test_create' , enabled = True )
543543 pos , kwargs = fake_rsrc ._meta_data ['bigip' ].\
544544 _meta_data ['icr_session' ].patch .call_args
545- assert kwargs [ 'json' ][ 'enabled' ] is True
546- assert 'disabled' not in kwargs ['json ' ]
545+ assert '"enabled": true' in kwargs [ 'data' ]
546+ assert 'disabled' not in kwargs ['data ' ]
547547
548548 def test_reduce_boolean_same_value (self , fake_rsrc ):
549549 with pytest .raises (BooleansToReduceHaveSameValue ) as ex :
0 commit comments