Skip to content

Commit

Permalink
Test parametrized to test both SUB and SYNC_SUB
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Alonso committed Jun 29, 2017
1 parent c735550 commit 92dd477
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osbrain/tests/test_agent_sync_publications.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,16 @@ def on_error(agent):
agent.error_log.append('error')


def test_change_subscription_topics_sync(nsproxy):
@pytest.mark.parametrize('socket_type', ['PUB', 'SYNC_PUB'])
def test_change_subscription_topics_sync(nsproxy, socket_type):
'''
Test for the different options of subscribing/unsubscribing to topics
in the SYNC_PUB/SYNC_SUB pattern.
'''
server = run_agent('server')
client = run_agent('client')

addr = server.bind('SYNC_PUB', alias='pub', handler=lambda: None)
addr = server.bind(socket_type, alias='pub', handler=lambda: None)
client.set_attr(received=[])
client.connect(addr, alias='sub', handler=receive)

Expand Down

0 comments on commit 92dd477

Please sign in to comment.