Skip to content

Commit

Permalink
test: add ValidateJSONMiddleware to test_bytes_or_file
Browse files Browse the repository at this point in the history
  • Loading branch information
yolile committed Apr 11, 2024
1 parent 9f1a503 commit 4f2b503
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_spidermiddlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async def test_passthrough(middleware_class, item):
{'data': {'releases': [{'b': 'c'}], 'version': '1.1'}, 'data_type': 'release_package', 'number': 1}),
(AddPackageMiddleware, 'data_type', 'release',
{'data': {'releases': [{'a': [{'b': 'c'}]}], 'version': '1.1'}, 'data_type': 'release_package'}),
(ValidateJSONMiddleware, 'validate_json', True, {'data': b'{"a":[{"b": "c"}]}'}),
# ResizePackageMiddleware is only used with CompressedFileSpider and BigFileSpider.
# ReadDataMiddleware is only used with file-like objects.
])
Expand Down

0 comments on commit 4f2b503

Please sign in to comment.