@@ -62,6 +62,7 @@ def test_get_custom_metadata_fields_succeeds(self):
6262 responses .add (
6363 responses .GET ,
6464 url ,
65+ content_type = "application/json" ,
6566 body = """[{
6667 "id": "62a9d5f6db485107347bb7f2",
6768 "name": "test10",
@@ -115,7 +116,7 @@ def test_get_custom_metadata_fields_succeeds(self):
115116 ],
116117 "httpStatusCode" : 200 ,
117118 "headers" : {
118- "Content-Type" : "text/plain " ,
119+ "Content-Type" : "application/json " ,
119120 "Accept-Encoding" : "gzip, deflate" ,
120121 "Authorization" : "Basic ZmFrZTEyMjo=" ,
121122 },
@@ -303,7 +304,7 @@ def test_delete_custom_metadata_fields_succeeds(self):
303304 URL .API_BASE_URL = "http://test.com"
304305 url = "{}/v1/customMetadataFields/{}" .format (URL .API_BASE_URL , self .field_id )
305306 headers = create_headers_for_test ()
306- responses .add (responses .DELETE , url , status = 204 , headers = headers , body = "{}" )
307+ responses .add (responses .DELETE , url , status = 204 , headers = headers )
307308 resp = self .client .delete_custom_metadata_field (self .field_id )
308309
309310 mock_response_metadata = {
@@ -385,13 +386,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_number(self):
385386 """
386387 URL .API_BASE_URL = "http://test.com"
387388 url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
388- headers = {"Content-Type" : "application/json" }
389+ headers = {}
389390 headers .update (create_headers_for_test ())
390391 responses .add (
391392 responses .POST ,
392393 url ,
393394 status = 201 ,
394395 headers = headers ,
396+ content_type = "application/json" ,
395397 body = """{
396398 "id": "62dfc03b1b02a58936efca37",
397399 "name": "test",
@@ -422,7 +424,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_number(self):
422424 },
423425 "httpStatusCode" : 201 ,
424426 "headers" : {
425- "Content-Type" : "text/plain, application/json" ,
427+ "Content-Type" : "application/json" ,
426428 "Accept-Encoding" : "gzip, deflate" ,
427429 "Authorization" : "Basic ZmFrZTEyMjo=" ,
428430 },
@@ -457,13 +459,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_textarea(self):
457459 """
458460 URL .API_BASE_URL = "http://test.com"
459461 url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
460- headers = {"Content-Type" : "application/json" }
462+ headers = {}
461463 headers .update (create_headers_for_test ())
462464 responses .add (
463465 responses .POST ,
464466 url ,
465467 status = 201 ,
466468 headers = headers ,
469+ content_type = "application/json" ,
467470 body = """{
468471 "id": "62e0d7ae1b02a589360dc1fd",
469472 "name": "test",
@@ -493,7 +496,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_textarea(self):
493496
494497 mock_response_metadata = {
495498 "headers" : {
496- "Content-Type" : "text/plain, application/json" ,
499+ "Content-Type" : "application/json" ,
497500 "Accept-Encoding" : "gzip, deflate" ,
498501 "Authorization" : "Basic ZmFrZTEyMjo=" ,
499502 },
@@ -543,13 +546,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_date(self):
543546 """
544547 URL .API_BASE_URL = "http://test.com"
545548 url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
546- headers = {"Content-Type" : "application/json" }
549+ headers = {}
547550 headers .update (create_headers_for_test ())
548551 responses .add (
549552 responses .POST ,
550553 url ,
551554 status = 201 ,
552555 headers = headers ,
556+ content_type = "application/json" ,
553557 body = """{
554558 "id": "62dfc9f41b02a58936f0d284",
555559 "name": "test-date",
@@ -575,7 +579,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_date(self):
575579
576580 mock_response_metadata = {
577581 "headers" : {
578- "Content-Type" : "text/plain, application/json" ,
582+ "Content-Type" : "application/json" ,
579583 "Accept-Encoding" : "gzip, deflate" ,
580584 "Authorization" : "Basic ZmFrZTEyMjo=" ,
581585 },
@@ -621,13 +625,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_boolean(self):
621625 """
622626 URL .API_BASE_URL = "http://test.com"
623627 url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
624- headers = {"Content-Type" : "application/json" }
628+ headers = {}
625629 headers .update (create_headers_for_test ())
626630 responses .add (
627631 responses .POST ,
628632 url ,
629633 status = 201 ,
630634 headers = headers ,
635+ content_type = "application/json" ,
631636 body = """{
632637 "id": "62dfcb801b02a58936f0fc39",
633638 "name": "test-boolean",
@@ -653,7 +658,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_boolean(self):
653658
654659 mock_response_metadata = {
655660 "headers" : {
656- "Content-Type" : "text/plain, application/json" ,
661+ "Content-Type" : "application/json" ,
657662 "Accept-Encoding" : "gzip, deflate" ,
658663 "Authorization" : "Basic ZmFrZTEyMjo=" ,
659664 },
@@ -699,13 +704,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_single_select(self):
699704 """
700705 URL .API_BASE_URL = "http://test.com"
701706 url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
702- headers = {"Content-Type" : "application/json" }
707+ headers = {}
703708 headers .update (create_headers_for_test ())
704709 responses .add (
705710 responses .POST ,
706711 url ,
707712 status = 201 ,
708713 headers = headers ,
714+ content_type = "application/json" ,
709715 body = """{
710716 "id": "62dfcdb21b02a58936f14c97",
711717 "name": "test",
@@ -729,7 +735,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_single_select(self):
729735
730736 mock_response_metadata = {
731737 "headers" : {
732- "Content-Type" : "text/plain, application/json" ,
738+ "Content-Type" : "application/json" ,
733739 "Accept-Encoding" : "gzip, deflate" ,
734740 "Authorization" : "Basic ZmFrZTEyMjo=" ,
735741 },
@@ -775,13 +781,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_multi_select(self):
775781 """
776782 URL .API_BASE_URL = "http://test.com"
777783 url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
778- headers = {"Content-Type" : "application/json" }
784+ headers = {}
779785 headers .update (create_headers_for_test ())
780786 responses .add (
781787 responses .POST ,
782788 url ,
783789 status = 201 ,
784790 headers = headers ,
791+ content_type = "application/json" ,
785792 body = """{
786793 "id": "62dfcf001b02a58936f17808",
787794 "name": "test",
@@ -809,7 +816,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_multi_select(self):
809816
810817 mock_response_metadata = {
811818 "headers" : {
812- "Content-Type" : "text/plain, application/json" ,
819+ "Content-Type" : "application/json" ,
813820 "Accept-Encoding" : "gzip, deflate" ,
814821 "Authorization" : "Basic ZmFrZTEyMjo=" ,
815822 },
@@ -857,12 +864,13 @@ def test_update_custom_metadata_fields_succeeds(self):
857864 """
858865 URL .API_BASE_URL = "http://test.com"
859866 url = "{}/v1/customMetadataFields/{}" .format (URL .API_BASE_URL , self .field_id )
860- headers = {"Content-Type" : "application/json" }
867+ headers = {}
861868 headers .update (create_headers_for_test ())
862869 responses .add (
863870 responses .PATCH ,
864871 url ,
865872 headers = headers ,
873+ content_type = "application/json" ,
866874 body = """{
867875 "id": "62a9d5f6db485107347bb7f2",
868876 "name": "test",
@@ -892,7 +900,7 @@ def test_update_custom_metadata_fields_succeeds(self):
892900 },
893901 "httpStatusCode" : 200 ,
894902 "headers" : {
895- "Content-Type" : "text/plain, application/json" ,
903+ "Content-Type" : "application/json" ,
896904 "Accept-Encoding" : "gzip, deflate" ,
897905 "Authorization" : "Basic ZmFrZTEyMjo=" ,
898906 },
0 commit comments