Skip to content

Commit

Permalink
Even better tests! (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
DemonicSavage committed Nov 30, 2023
1 parent d592d89 commit c850d56
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ async def test_plugin(self, vcr, plugin, vcr_cassette_name):

@pytest.mark.parametrize("plugin", scraper_plugins)
async def test_plugin_fail(self, mocker, plugin, vcr_cassette_name):
if not plugin.is_api:
with pytest.raises(ParsingError):
await plugin.ListParser().get_num_pages(mock_empty_response)
with pytest.raises(ParsingError):
await plugin.ListParser().get_page(mock_empty_response)
with pytest.raises(ParsingError):
await plugin.ItemParser().create_item(mock_empty_response)
with pytest.raises(ParsingError):
await plugin.ListParser().get_num_pages(mock_empty_response)
with pytest.raises(ParsingError):
await plugin.ListParser().get_page(mock_empty_response)
with pytest.raises(ParsingError):
await plugin.ItemParser().create_item(mock_empty_response)

0 comments on commit c850d56

Please sign in to comment.