blob: a6e9eb650e4282f45060f5542c99f80a9b624d64 (
plain) (
tree)
|
|
from __future__ import print_function, unicode_literals
def test_PresenceChange(realish_eventrouter, team, user_alice):
team.ws.add({
"type": "presence_change",
"user": user_alice.identifier,
"presence": "active",
})
team.ws.add({
"type": "presence_change",
"user": user_alice.identifier,
"presence": "away",
})
realish_eventrouter.receive_ws_callback(team.team_hash)
realish_eventrouter.handle_next()
assert user_alice.presence == "active"
realish_eventrouter.handle_next()
assert user_alice.presence == "away"
|