Skip to content

Commit

Permalink
USe append-receivde
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Alonso committed Jun 29, 2017
1 parent 747e57b commit 97d204e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions osbrain/tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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')
Expand Down

0 comments on commit 97d204e

Please sign in to comment.