Here are the examples of the python api bokeh.client.states.WAITING_FOR_REPLY taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
View Source File : test_states.py
License : MIT License
Project Creator : rthorst
License : MIT License
Project Creator : rthorst
def test_WAITING_FOR_REPLY():
s = bcs.WAITING_FOR_REPLY("reqid")
assert s.reply == None
assert s.reqid == "reqid"
r = s.run(MockConnection(to_pop=None))
assert r.result() == "_transition_to_disconnected"
assert s.reply is None
m = MockMessage()
r = s.run(MockConnection(to_pop=m))
res = r.result()
assert res[0] == "_transition"
assert isinstance(res[1], bcs.CONNECTED_AFTER_ACK)
assert s.reply is m
s._reqid = "nomatch"
r = s.run(MockConnection(to_pop=m))
assert r.result() == "_next"
#-----------------------------------------------------------------------------
# Private API
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Code
#-----------------------------------------------------------------------------