diff options
author | drebs <drebs@leap.se> | 2013-07-25 15:20:33 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-07-25 15:20:33 -0300 |
commit | dcb71ea078a7f56f76bf84b352656cdfa252d677 (patch) | |
tree | 15354325e5997a119a6b24d70a4891c3c586e44c /src/leap/common/tests | |
parent | c22072f6a12a9d896eb324a848043011b0ea30c5 (diff) |
Fix events doc about reqcbk signature. Closes #3261
Diffstat (limited to 'src/leap/common/tests')
-rw-r--r-- | src/leap/common/tests/test_events.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/leap/common/tests/test_events.py b/src/leap/common/tests/test_events.py index bc04dd6..0779b2e 100644 --- a/src/leap/common/tests/test_events.py +++ b/src/leap/common/tests/test_events.py @@ -346,7 +346,7 @@ class EventsTestCase(unittest.TestCase): # executed after async register, when response is received from server def reqcbk(request, response): - flag(request.event) + flag(request.event, response.status) # callback registered by application def callback(request): @@ -357,7 +357,7 @@ class EventsTestCase(unittest.TestCase): self.assertIsNone(result) events.signal(CLIENT_UID) time.sleep(1) # wait for signal to arrive from server - flag.assert_called_once_with(CLIENT_UID) + flag.assert_called_once_with(CLIENT_UID, EventResponse.OK) def test_async_signal(self): """ @@ -367,13 +367,13 @@ class EventsTestCase(unittest.TestCase): # executed after async signal, when response is received from server def reqcbk(request, response): - flag(request.event) + flag(request.event, response.status) # passing a callback as reqcbk param makes the call asynchronous result = events.signal(CLIENT_UID, reqcbk=reqcbk) self.assertIsNone(result) time.sleep(1) # wait for signal to arrive from server - flag.assert_called_once_with(CLIENT_UID) + flag.assert_called_once_with(CLIENT_UID, EventResponse.OK) def test_async_unregister(self): """ @@ -383,7 +383,7 @@ class EventsTestCase(unittest.TestCase): # executed after async signal, when response is received from server def reqcbk(request, response): - flag(request.event) + flag(request.event, response.status) # callback registered by application def callback(request): @@ -394,7 +394,7 @@ class EventsTestCase(unittest.TestCase): result = events.unregister(CLIENT_UID, reqcbk=reqcbk) self.assertIsNone(result) time.sleep(1) # wait for signal to arrive from server - flag.assert_called_once_with(CLIENT_UID) + flag.assert_called_once_with(CLIENT_UID, EventResponse.OK) def test_async_ping_server(self): """ @@ -404,12 +404,12 @@ class EventsTestCase(unittest.TestCase): # executed after async signal, when response is received from server def reqcbk(request, response): - flag() + flag(response.status) result = events.ping_server(reqcbk=reqcbk) self.assertIsNone(result) time.sleep(1) # wait for response to arrive from server. - flag.assert_called_once_with() + flag.assert_called_once_with(EventResponse.OK) def test_async_ping_client(self): """ @@ -419,10 +419,10 @@ class EventsTestCase(unittest.TestCase): # executed after async signal, when response is received from server def reqcbk(request, response): - flag() + flag(response.status) daemon = client.ensure_client_daemon() result = events.ping_client(daemon.get_port(), reqcbk=reqcbk) self.assertIsNone(result) time.sleep(1) # wait for response to arrive from server. - flag.assert_called_once_with() + flag.assert_called_once_with(EventResponse.OK) |