aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-09-03 12:21:41 -0700
committerBryan Newbold <bnewbold@archive.org>2021-09-03 12:21:41 -0700
commit660fe9eeb3ec2bd0f4ae8c9c62932098c1a7b625 (patch)
tree3a5b641cb9de2edebdde71b5196b1a8c7dd32dd4 /python/tests
parent2ebef36c083b59d158fae7098da49bf972141f1c (diff)
downloadsandcrawler-660fe9eeb3ec2bd0f4ae8c9c62932098c1a7b625.tar.gz
sandcrawler-660fe9eeb3ec2bd0f4ae8c9c62932098c1a7b625.zip
refactor and expand wall/block/cookie URL patterns
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/test_ingest.py14
1 files changed, 14 insertions, 0 deletions
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
+