From 9c1de8ebb7b9e00bc6afc9f2ed2978a003d9abd8 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 18 Jun 2019 16:57:29 +0200 Subject: Re-inject behavior scripts on site reload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #13. Event handler’s push() is async now. --- crocoite/test_warc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crocoite/test_warc.py') 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)) -- cgit v1.2.3