From fe05c270819a4bdda8539a10412c29ab8935e0c2 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 5 Sep 2018 16:10:03 +0200 Subject: [PATCH] bring the test into a bit of a better shape --- python/tests/test_lowlevel.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/tests/test_lowlevel.py b/python/tests/test_lowlevel.py index ca4a25b2..c173b404 100644 --- a/python/tests/test_lowlevel.py +++ b/python/tests/test_lowlevel.py @@ -38,7 +38,7 @@ def test_basic_events(dc_context, dc_threads, register_dc_callback, tmpdir, user # XXX how to give this string back to delta-core properly? # for now we just return nothing else: - q.put((evt, data1, data2)) + q.put((evt_name, data1, data2)) return 0 register_dc_callback(dc_context, cb) @@ -49,8 +49,10 @@ def test_basic_events(dc_context, dc_threads, register_dc_callback, tmpdir, user capi.lib.dc_configure(dc_context) while 1: - evt_name, data1, data2 = q.get(timeout=1.0) - pass + evt_name, data1, data2 = q.get(timeout=2.0) + if evt_name == "DC_EVENT_ERROR": + assert 0 + # XXX look for successful termination once we make things pass def read_url(url):