summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-07-23 00:00:39 -0300
committerKali Kaneko <kali@leap.se>2015-07-23 16:17:53 -0400
commit486da2654c63262f0dbc2d603125f0c8c5c4ea74 (patch)
tree043d145dacb486f19e96818eee2ff4cb7b3595f6
parent5502318835626527d9818c360c7fd2b1a4b01145 (diff)
[tests] fixed events tests
The events tests check for register and emit signals, but because the flag set_events_enabled was False by default in the tests, no signals were being emitted. I added the flag to the setUp and tearDown of the tests, they are still very slow but at least they are passing now
-rw-r--r--src/leap/common/tests/test_events.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/common/tests/test_events.py b/src/leap/common/tests/test_events.py
index e2a918f..8f08eeb 100644
--- a/src/leap/common/tests/test_events.py
+++ b/src/leap/common/tests/test_events.py
@@ -26,6 +26,7 @@ from twisted.internet import defer
from leap.common.events import server
from leap.common.events import client
+from leap.common.events import flags
from leap.common.events import txclient
from leap.common.events import catalog
from leap.common.events.errors import CallbackAlreadyRegisteredError
@@ -44,10 +45,12 @@ class EventsGenericClientTestCase(object):
self._client.configure_client(
emit_addr="tcp://127.0.0.1:%d" % self._server.pull_port,
reg_addr="tcp://127.0.0.1:%d" % self._server.pub_port)
+ flags.set_events_enabled(True)
def tearDown(self):
self._client.shutdown()
self._server.shutdown()
+ flags.set_events_enabled(False)
# wait a bit for sockets to close properly
time.sleep(0.1)