From 97d204e257225bee3d51c7d3c04b43752efd0d36 Mon Sep 17 00:00:00 2001 From: Guillermo Alonso Date: Thu, 29 Jun 2017 12:23:43 +0200 Subject: [PATCH] USe append-receivde --- osbrain/tests/test_helper.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/osbrain/tests/test_helper.py b/osbrain/tests/test_helper.py index 1284349..39328a8 100644 --- a/osbrain/tests/test_helper.py +++ b/osbrain/tests/test_helper.py @@ -13,10 +13,7 @@ from common import nsproxy # pragma: no flakes from common import agent_logger # pragma: no flakes - - -def receive(agent, response): - agent.received.append(response) +from common import append_received def test_synchronize_sync_pub(nsproxy): @@ -27,10 +24,10 @@ def test_synchronize_sync_pub(nsproxy): server = run_agent('server') client = run_agent('client') - addr = server.bind('SYNC_PUB', alias='sync_pub', handler=receive) + addr = server.bind('SYNC_PUB', alias='sync_pub', handler=append_received) client.set_attr(received=[]) - client.connect(addr, alias='sync_sub', handler=receive) + client.connect(addr, alias='sync_sub', handler=append_received) # Guarantee the PUB/SUB is stablished synchronize_sync_pub(server, 'sync_pub', client, 'sync_sub')