Skip to content

Commit

Permalink
Change exception raise in test
Browse files Browse the repository at this point in the history
  • Loading branch information
aguilerapy committed Jun 23, 2020
1 parent d1e7a72 commit 80ef356
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_links_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from scrapy.http import Request

from kingfisher_scrapy.base_spider import LinksSpider
from kingfisher_scrapy.exceptions import KingfisherScrapyError
from kingfisher_scrapy.exceptions import MissingNextLinkError
from kingfisher_scrapy.items import File, FileError
from tests import response_fixture, spider_with_crawler

Expand Down Expand Up @@ -67,7 +67,7 @@ def test_next_link_not_found():
spider.next_page_formatter = lambda url: 'next.json'
body = '{"links": {"next": ""}}'

with pytest.raises(KingfisherScrapyError) as e:
with pytest.raises(MissingNextLinkError) as e:
meta = {'file_name': 'test', 'depth': 0}
spider.next_link(response_fixture(meta=meta, body=body))
assert str(e.value) == 'next link not found on the first page: http://example.com'
Expand Down

0 comments on commit 80ef356

Please sign in to comment.