We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d81c7be commit ff50342Copy full SHA for ff50342
tests/mock_vws/fixtures/prepared_requests.py
@@ -66,8 +66,6 @@ def _add_target(
66
prepared_request = request.prepare() # type: ignore
67
68
return TargetAPIEndpoint(
69
- # We expect a bad request error because we have not given the required
70
- # JSON body elements.
71
successful_headers_status_code=codes.BAD_REQUEST,
72
successful_headers_result_code=ResultCodes.FAIL,
73
prepared_request=prepared_request,
@@ -397,7 +395,7 @@ def _update_target(
397
395
)
398
396
data: Dict[str, Any] = {}
399
request_path = f'/targets/{target_id}'
400
- content = bytes(str(data), encoding='utf-8')
+ content = bytes(json.dumps(data), encoding='utf-8')
401
content_type = 'application/json'
402
403
date = rfc_1123_date()
0 commit comments