From 660fe9eeb3ec2bd0f4ae8c9c62932098c1a7b625 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 3 Sep 2021 12:21:41 -0700 Subject: refactor and expand wall/block/cookie URL patterns --- python/tests/test_ingest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'python/tests') diff --git a/python/tests/test_ingest.py b/python/tests/test_ingest.py index 46346b7..b51f721 100644 --- a/python/tests/test_ingest.py +++ b/python/tests/test_ingest.py @@ -191,3 +191,17 @@ def test_ingest_wall_blocklist(ingest_worker): assert resp['status'] == "skip-wall" assert resp['request'] == request +@responses.activate +def test_ingest_cookie_blocklist(ingest_worker): + + request = { + 'ingest_type': 'pdf', + 'base_url': "https://test.fatcat.wiki/cookieAbsent", + } + + resp = ingest_worker.process(request) + + assert resp['hit'] == False + assert resp['status'] == "blocked-cookie" + assert resp['request'] == request + -- cgit v1.2.3