Skip to content

Commit

Permalink
Simplified node tests.
Browse files Browse the repository at this point in the history
Removed "assert not watcher.wait('return_value')" since it does not make
much sense imo. Between waiting for it two lines before and
watcher.clear it could get removed if it occured a second time…
  • Loading branch information
apollo13 committed Jan 17, 2017
1 parent 91443dc commit 3ac4f61
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/node/test_server.py
Expand Up @@ -75,19 +75,14 @@ def test_auto_reconnect(app, watcher, manager):
watcher.clear()

# start a new server
app = Node(port=app.bind[1], server_ip=app.bind[0])
app.register(manager)
assert watcher.wait('ready', channel=app.channel)
node2= Node(port=app.bind[1], server_ip=app.bind[0])

This comment has been minimized.

Copy link
@spaceone

spaceone Jan 17, 2017

Contributor

missing whitespace :)

node2.register(manager)
assert watcher.wait('ready', channel=node2.channel)
watcher.clear()

assert watcher.wait('connected', channel=chan)

# close the server again
app.fire(close(), app.channel)
assert watcher.wait('closed', channel=app.channel)

client.unregister()
app.unregister()


def test_server_send_all(app, watcher, manager):
Expand Down Expand Up @@ -123,8 +118,6 @@ def test_server_send(app, watcher, manager):
event = return_value()
app.server.send(event, app.server.get_socks()[0], no_result=True)
assert watcher.wait('return_value')
watcher.clear()
assert not watcher.wait('return_value')

client1.unregister()
client2.unregister()
Expand Down

0 comments on commit 3ac4f61

Please sign in to comment.