File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/smithy-http/tests/unit Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 4444from smithy_http .deserializers import HTTPResponseDeserializer
4545from smithy_json import JSONCodec
4646from smithy_http .aio import HTTPResponse as _HTTPResponse
47- from smithy_http import tuples_to_fields , Fields
47+ from smithy_http import tuples_to_fields , Field , Fields
4848from smithy_http .serializers import HTTPRequestSerializer , HTTPResponseSerializer
4949
5050# TODO: empty header prefix, query map
@@ -1604,6 +1604,7 @@ def async_streaming_payload_cases() -> list[HTTPMessageTestCase]:
16041604 + async_streaming_payload_cases ()
16051605)
16061606
1607+ CONTENT_TYPE_FIELD = Field (name = "content-type" , values = ["application/json" ])
16071608
16081609@pytest .mark .parametrize ("case" , REQUEST_SER_CASES )
16091610async def test_serialize_http_request (case : HTTPMessageTestCase ) -> None :
@@ -1623,6 +1624,8 @@ async def test_serialize_http_request(case: HTTPMessageTestCase) -> None:
16231624 actual_query = actual .destination .query or ""
16241625 expected_query = case .request .destination .query or ""
16251626 assert actual_query == expected_query
1627+ # set the content-type field here, otherwise cases would have to duplicate it everywhere
1628+ expected .fields .set_field (CONTENT_TYPE_FIELD )
16261629 assert actual .fields == expected .fields
16271630
16281631 if case .request .body :
You can’t perform that action at this time.
0 commit comments