@@ -410,7 +410,7 @@ def as_requests_kwargs(
410410 "deps/schemathesis/src/schemathesis/models.py -> new extra: %s" , new_extra
411411 )
412412
413- additional_headers = extra .pop ("headers" , None )
413+ additional_headers = new_extra .pop ("headers" , None )
414414 if additional_headers :
415415 # Additional headers, needed for the serializer
416416 for key , value in additional_headers .items ():
@@ -1062,7 +1062,10 @@ def from_case(cls, case: Case, session: requests.Session) -> Request:
10621062 @classmethod
10631063 def from_prepared_request (cls , prepared : requests .PreparedRequest ) -> Request :
10641064 """A prepared request version is already stored in `requests.Response`."""
1065- logger .debug ("deps/schemathesis/src/schemathesis/models.py: from_prepared_request in Request -> body: %s" , prepared .body )
1065+ logger .debug (
1066+ "deps/schemathesis/src/schemathesis/models.py: from_prepared_request in Request -> body: %s" ,
1067+ prepared .body ,
1068+ )
10661069 body = prepared .body
10671070 if isinstance (body , str ):
10681071 # can be a string for `application/x-www-form-urlencoded`
@@ -1175,9 +1178,15 @@ def from_requests(
11751178 status : Status ,
11761179 checks : list [Check ],
11771180 ) -> Interaction :
1178-
1179- logger .debug ("deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> response.request.body: %s" , response .request .body )
1180- logger .debug ("deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> case.body: %s" , case .body )
1181+
1182+ logger .debug (
1183+ "deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> response.request.body: %s" ,
1184+ response .request .body ,
1185+ )
1186+ logger .debug (
1187+ "deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> case.body: %s" ,
1188+ case .body ,
1189+ )
11811190 # new_request: Request = Request.from_prepared_request(response.request)
11821191 # if case.metadata is not None and new_request.body is not None:
11831192 # logger.debug("deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> request.body: %s", base64.b64decode(new_request.body))
@@ -1187,7 +1196,7 @@ def from_requests(
11871196 # case.body[key] = case.metadata[key]["image_name"]
11881197 # logger.debug("deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> %s", case.body)
11891198 # new_request.body = base64.b64encode(str(case.body).encode("utf-8")).decode("utf-8")
1190-
1199+
11911200 # Remove image data from the request body and replace it with the image name
11921201 # if new_request.body is not None:
11931202 # # logger.debug("deps/schemathesis/src/schemathesis/models.py: from_requests in Interaction -> %s", base64.b64decode(Request.from_prepared_request(response.request).body))
0 commit comments