Skip to content

Commit

Permalink
test: Fix line terminator for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 11, 2024
1 parent 2251815 commit 79ec960
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_spidermiddlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def alist(iterable):
FileError(
file_name='test.json',
url='http://test.com',
errors={},
errors={'http_code': 500},
),
])
async def test_passthrough(middleware_class, item):
Expand Down Expand Up @@ -555,10 +555,10 @@ async def test_validate_json_middleware(valid, klass, caplog):
else:
number = ", 'number': 1" if klass is FileItem else ''
assert invalid_json_count == 1
assert messages == [
"Dropped: Invalid JSON\n"
assert [message.splitlines() for message in messages] == [[
"Dropped: Invalid JSON",
f"{{'file_name': 'test.json', 'url': 'http://test.com', 'data_type': 'release_package'{number}}}"
]
]]


@pytest.mark.parametrize('data', [[], {}])
Expand Down

0 comments on commit 79ec960

Please sign in to comment.