warcprox/tests/test_dedup.py
Vangelis Banos fc5f39ffed Add CDX Server based deduplication
Add ``--cdxserver-dedup URL`` option.
Create ``warcprox.dedup.CdxServerDedup`` class.
Add dummy unit test (TODO)
2017-10-19 14:33:12 +00:00

11 lines
374 B
Python

import pytest
from warcprox.dedup import CdxServerDedup
def test_cdx():
# TODO add mocking of CDX Server response
# TODO check found and not found cases
cdx_server = CdxServerDedup(cdx_url="https://web.archive.org/cdx/search/cdx")
res = cdx_server.lookup(digest_key="B2LTWWPUOYAH7UIPQ7ZUPQ4VMBSVC36A",
url="http://example.com")