scrapy.Request.assert_not_called

Here are the examples of the python api scrapy.Request.assert_not_called taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

3 Source : test_middleware.py
with MIT License
from pjsier

def test_ignore_archive_urls(response_mock):
    middleware = WaybackMiddleware(MagicMock())
    response_mock.url = "https://web.archive.org/save/https://example.com"
    [res for res in middleware.process_spider_output(response_mock, [], None)]
    scrapy.Request.assert_not_called()


def test_get_item_urls(monkeypatch, scrapy_request, response_mock):

3 Source : test_middleware.py
with MIT License
from pjsier

def test_ignore_post_requests(scrapy_request, response_mock):
    middleware = WaybackMiddleware(MagicMock())
    response_mock.request.method = "POST"
    [res for res in middleware.process_spider_output(response_mock, [], None)]
    scrapy.Request.assert_not_called()


def test_set_slot_delay_on_429(response_mock):