Skip to content

Commit 6f947dd

Browse files
committed
Make clear what data type is taken [skip ci]
1 parent 7fd081d commit 6f947dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/mock_vws/test_invalid_json.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def test_invalid_json(
4545
date = rfc_1123_date()
4646

4747
endpoint_headers = dict(endpoint.prepared_request.headers)
48-
takes_data = bool(endpoint.auth_header_content_type)
48+
takes_json_data = (
49+
endpoint.auth_header_content_type == 'application/json'
50+
)
4951
endpoint_headers = dict(endpoint.prepared_request.headers)
5052

5153
authorization_string = authorization_header(
@@ -80,14 +82,14 @@ def test_invalid_json(
8082
request=endpoint.prepared_request,
8183
)
8284

83-
if date_is_skewed and takes_data:
85+
if date_is_skewed and takes_json_data:
8486
# On the real implementation, we get `codes.FORBIDDEN` and
8587
# `REQUEST_TIME_TOO_SKEWED`.
8688
# See https://github.com/adamtheturtle/vws-python/issues/407 for
8789
# implementing this on them mock.
8890
return
8991

90-
if not date_is_skewed and takes_data:
92+
if not date_is_skewed and takes_json_data:
9193
assert_vws_failure(
9294
response=response,
9395
status_code=codes.BAD_REQUEST,

0 commit comments

Comments
 (0)