diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2019-06-18 16:57:29 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-06-18 16:57:29 +0200 |
commit | 9c1de8ebb7b9e00bc6afc9f2ed2978a003d9abd8 (patch) | |
tree | 4ad0c2a78e23896739d6dadbfbea9cfd1bb4d722 /crocoite/test_warc.py | |
parent | b4669705fa8e581c17bbe0ca0c7cf4fadbd3deb8 (diff) | |
download | crocoite-9c1de8ebb7b9e00bc6afc9f2ed2978a003d9abd8.tar.gz crocoite-9c1de8ebb7b9e00bc6afc9f2ed2978a003d9abd8.tar.bz2 crocoite-9c1de8ebb7b9e00bc6afc9f2ed2978a003d9abd8.zip |
Re-inject behavior scripts on site reload
Fixes #13. Event handler’s push() is async now.
Diffstat (limited to 'crocoite/test_warc.py')
-rw-r--r-- | crocoite/test_warc.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crocoite/test_warc.py b/crocoite/test_warc.py index 954e8c8..478892a 100644 --- a/crocoite/test_warc.py +++ b/crocoite/test_warc.py @@ -84,8 +84,9 @@ def event (): requestResponsePair (), ) +@pytest.mark.asyncio @given (st.lists (event ())) -def test_push (golden): +async def test_push (golden): def checkWarcinfoId (headers): if lastWarcinfoRecordid is not None: assert headers['WARC-Warcinfo-ID'] == lastWarcinfoRecordid @@ -97,7 +98,7 @@ def test_push (golden): with open('/tmp/test.warc.gz', 'w+b') as fd: with WarcHandler (fd, logger) as handler: for g in golden: - handler.push (g) + await handler.push (g) fd.seek (0) it = iter (ArchiveIterator (fd)) |