Skip to content

Commit

Permalink
test: Move middleware in processing order
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 11, 2024
1 parent 169cc74 commit 96ead1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_spidermiddlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ async def test_passthrough(middleware_class, item):
{'data': {'a': [{'b': 'c'}]}, 'number': 1}),
(LineDelimitedMiddleware, 'line_delimited', True,
{'data': b'{"a":[{"b": "c"}]}', 'number': 1}),
(ValidateJSONMiddleware, 'validate_json', True,
{'data': b'{"a":[{"b": "c"}]}'}),
(RootPathMiddleware, 'root_path', 'a.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 96ead1e

Please sign in to comment.