@@ -62,6 +62,7 @@ def test_get_custom_metadata_fields_succeeds(self):
62
62
responses .add (
63
63
responses .GET ,
64
64
url ,
65
+ content_type = "application/json" ,
65
66
body = """[{
66
67
"id": "62a9d5f6db485107347bb7f2",
67
68
"name": "test10",
@@ -115,7 +116,7 @@ def test_get_custom_metadata_fields_succeeds(self):
115
116
],
116
117
"httpStatusCode" : 200 ,
117
118
"headers" : {
118
- "Content-Type" : "text/plain " ,
119
+ "Content-Type" : "application/json " ,
119
120
"Accept-Encoding" : "gzip, deflate" ,
120
121
"Authorization" : "Basic ZmFrZTEyMjo=" ,
121
122
},
@@ -303,7 +304,7 @@ def test_delete_custom_metadata_fields_succeeds(self):
303
304
URL .API_BASE_URL = "http://test.com"
304
305
url = "{}/v1/customMetadataFields/{}" .format (URL .API_BASE_URL , self .field_id )
305
306
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 )
307
308
resp = self .client .delete_custom_metadata_field (self .field_id )
308
309
309
310
mock_response_metadata = {
@@ -385,13 +386,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_number(self):
385
386
"""
386
387
URL .API_BASE_URL = "http://test.com"
387
388
url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
388
- headers = {"Content-Type" : "application/json" }
389
+ headers = {}
389
390
headers .update (create_headers_for_test ())
390
391
responses .add (
391
392
responses .POST ,
392
393
url ,
393
394
status = 201 ,
394
395
headers = headers ,
396
+ content_type = "application/json" ,
395
397
body = """{
396
398
"id": "62dfc03b1b02a58936efca37",
397
399
"name": "test",
@@ -422,7 +424,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_number(self):
422
424
},
423
425
"httpStatusCode" : 201 ,
424
426
"headers" : {
425
- "Content-Type" : "text/plain, application/json" ,
427
+ "Content-Type" : "application/json" ,
426
428
"Accept-Encoding" : "gzip, deflate" ,
427
429
"Authorization" : "Basic ZmFrZTEyMjo=" ,
428
430
},
@@ -457,13 +459,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_textarea(self):
457
459
"""
458
460
URL .API_BASE_URL = "http://test.com"
459
461
url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
460
- headers = {"Content-Type" : "application/json" }
462
+ headers = {}
461
463
headers .update (create_headers_for_test ())
462
464
responses .add (
463
465
responses .POST ,
464
466
url ,
465
467
status = 201 ,
466
468
headers = headers ,
469
+ content_type = "application/json" ,
467
470
body = """{
468
471
"id": "62e0d7ae1b02a589360dc1fd",
469
472
"name": "test",
@@ -493,7 +496,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_textarea(self):
493
496
494
497
mock_response_metadata = {
495
498
"headers" : {
496
- "Content-Type" : "text/plain, application/json" ,
499
+ "Content-Type" : "application/json" ,
497
500
"Accept-Encoding" : "gzip, deflate" ,
498
501
"Authorization" : "Basic ZmFrZTEyMjo=" ,
499
502
},
@@ -543,13 +546,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_date(self):
543
546
"""
544
547
URL .API_BASE_URL = "http://test.com"
545
548
url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
546
- headers = {"Content-Type" : "application/json" }
549
+ headers = {}
547
550
headers .update (create_headers_for_test ())
548
551
responses .add (
549
552
responses .POST ,
550
553
url ,
551
554
status = 201 ,
552
555
headers = headers ,
556
+ content_type = "application/json" ,
553
557
body = """{
554
558
"id": "62dfc9f41b02a58936f0d284",
555
559
"name": "test-date",
@@ -575,7 +579,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_date(self):
575
579
576
580
mock_response_metadata = {
577
581
"headers" : {
578
- "Content-Type" : "text/plain, application/json" ,
582
+ "Content-Type" : "application/json" ,
579
583
"Accept-Encoding" : "gzip, deflate" ,
580
584
"Authorization" : "Basic ZmFrZTEyMjo=" ,
581
585
},
@@ -621,13 +625,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_boolean(self):
621
625
"""
622
626
URL .API_BASE_URL = "http://test.com"
623
627
url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
624
- headers = {"Content-Type" : "application/json" }
628
+ headers = {}
625
629
headers .update (create_headers_for_test ())
626
630
responses .add (
627
631
responses .POST ,
628
632
url ,
629
633
status = 201 ,
630
634
headers = headers ,
635
+ content_type = "application/json" ,
631
636
body = """{
632
637
"id": "62dfcb801b02a58936f0fc39",
633
638
"name": "test-boolean",
@@ -653,7 +658,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_boolean(self):
653
658
654
659
mock_response_metadata = {
655
660
"headers" : {
656
- "Content-Type" : "text/plain, application/json" ,
661
+ "Content-Type" : "application/json" ,
657
662
"Accept-Encoding" : "gzip, deflate" ,
658
663
"Authorization" : "Basic ZmFrZTEyMjo=" ,
659
664
},
@@ -699,13 +704,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_single_select(self):
699
704
"""
700
705
URL .API_BASE_URL = "http://test.com"
701
706
url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
702
- headers = {"Content-Type" : "application/json" }
707
+ headers = {}
703
708
headers .update (create_headers_for_test ())
704
709
responses .add (
705
710
responses .POST ,
706
711
url ,
707
712
status = 201 ,
708
713
headers = headers ,
714
+ content_type = "application/json" ,
709
715
body = """{
710
716
"id": "62dfcdb21b02a58936f14c97",
711
717
"name": "test",
@@ -729,7 +735,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_single_select(self):
729
735
730
736
mock_response_metadata = {
731
737
"headers" : {
732
- "Content-Type" : "text/plain, application/json" ,
738
+ "Content-Type" : "application/json" ,
733
739
"Accept-Encoding" : "gzip, deflate" ,
734
740
"Authorization" : "Basic ZmFrZTEyMjo=" ,
735
741
},
@@ -775,13 +781,14 @@ def test_create_custom_metadata_fields_succeeds_with_type_multi_select(self):
775
781
"""
776
782
URL .API_BASE_URL = "http://test.com"
777
783
url = "{}/v1/customMetadataFields" .format (URL .API_BASE_URL )
778
- headers = {"Content-Type" : "application/json" }
784
+ headers = {}
779
785
headers .update (create_headers_for_test ())
780
786
responses .add (
781
787
responses .POST ,
782
788
url ,
783
789
status = 201 ,
784
790
headers = headers ,
791
+ content_type = "application/json" ,
785
792
body = """{
786
793
"id": "62dfcf001b02a58936f17808",
787
794
"name": "test",
@@ -809,7 +816,7 @@ def test_create_custom_metadata_fields_succeeds_with_type_multi_select(self):
809
816
810
817
mock_response_metadata = {
811
818
"headers" : {
812
- "Content-Type" : "text/plain, application/json" ,
819
+ "Content-Type" : "application/json" ,
813
820
"Accept-Encoding" : "gzip, deflate" ,
814
821
"Authorization" : "Basic ZmFrZTEyMjo=" ,
815
822
},
@@ -857,12 +864,13 @@ def test_update_custom_metadata_fields_succeeds(self):
857
864
"""
858
865
URL .API_BASE_URL = "http://test.com"
859
866
url = "{}/v1/customMetadataFields/{}" .format (URL .API_BASE_URL , self .field_id )
860
- headers = {"Content-Type" : "application/json" }
867
+ headers = {}
861
868
headers .update (create_headers_for_test ())
862
869
responses .add (
863
870
responses .PATCH ,
864
871
url ,
865
872
headers = headers ,
873
+ content_type = "application/json" ,
866
874
body = """{
867
875
"id": "62a9d5f6db485107347bb7f2",
868
876
"name": "test",
@@ -892,7 +900,7 @@ def test_update_custom_metadata_fields_succeeds(self):
892
900
},
893
901
"httpStatusCode" : 200 ,
894
902
"headers" : {
895
- "Content-Type" : "text/plain, application/json" ,
903
+ "Content-Type" : "application/json" ,
896
904
"Accept-Encoding" : "gzip, deflate" ,
897
905
"Authorization" : "Basic ZmFrZTEyMjo=" ,
898
906
},
0 commit comments