diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-10-27 18:50:17 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-10-27 18:50:17 -0700 |
commit | 826c7538e091fac14d987a3cd654975da964e240 (patch) | |
tree | 90345b4cabb461c624ca5a218c2fc01dce3055cd /python/tests/test_pushers.py | |
parent | 020037d4714e7ba2ab172c7278494aed0b2148ad (diff) | |
download | sandcrawler-826c7538e091fac14d987a3cd654975da964e240.tar.gz sandcrawler-826c7538e091fac14d987a3cd654975da964e240.zip |
make fmt (black 21.9b0)
Diffstat (limited to 'python/tests/test_pushers.py')
-rw-r--r-- | python/tests/test_pushers.py | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/python/tests/test_pushers.py b/python/tests/test_pushers.py index 353a560..ed17d24 100644 --- a/python/tests/test_pushers.py +++ b/python/tests/test_pushers.py @@ -6,22 +6,24 @@ def test_cdx_line_pusher(): sink = BlackholeSink() # vanilla (only default filters) - with open('tests/files/example.cdx', 'r') as cdx_file: + with open("tests/files/example.cdx", "r") as cdx_file: pusher = CdxLinePusher(sink, cdx_file) counts = pusher.run() - assert counts['total'] == 20 - assert counts['skip-parse'] == 1 - assert counts['pushed'] == 19 + assert counts["total"] == 20 + assert counts["skip-parse"] == 1 + assert counts["pushed"] == 19 # HTTP 200 and application/pdf - with open('tests/files/example.cdx', 'r') as cdx_file: - pusher = CdxLinePusher(sink, - cdx_file, - filter_mimetypes=['application/pdf'], - filter_http_statuses=[200, 226]) + with open("tests/files/example.cdx", "r") as cdx_file: + pusher = CdxLinePusher( + sink, + cdx_file, + filter_mimetypes=["application/pdf"], + filter_http_statuses=[200, 226], + ) counts = pusher.run() - assert counts['total'] == 20 - assert counts['skip-parse'] == 1 - assert counts['skip-http_status'] == 10 - assert counts['skip-mimetype'] == 2 - assert counts['pushed'] == 7 + assert counts["total"] == 20 + assert counts["skip-parse"] == 1 + assert counts["skip-http_status"] == 10 + assert counts["skip-mimetype"] == 2 + assert counts["pushed"] == 7 |