summaryrefslogtreecommitdiff
path: root/src/leap/common/testing/basetest.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-04-18 10:56:20 -0400
committerKali Kaneko <kali@leap.se>2016-04-18 10:56:20 -0400
commite30e06d9062578e1932b5a6a4c4124a1663e18c2 (patch)
tree7c81bef2afd8d32d0179cc0192239271252bc311 /src/leap/common/testing/basetest.py
parente5796bf55e3db177ee567118519136fd96ada3c4 (diff)
parentcef15c04610ee188052af78ead8cfe7ea29d81c6 (diff)
Merge tag '0.5.1'
Tag leap.bitmask version 0.5.1 # gpg: Signature made Mon 18 Apr 2016 10:52:44 AM BOT # gpg: using RSA key 1CAF6C5B9F720808 # gpg: Good signature from "Kaliyuga <kaliyuga@riseup.net>" [ultimate] # gpg: aka "Kali Kaneko (leap communications) <kali@leap.se>" [ultimate]
Diffstat (limited to 'src/leap/common/testing/basetest.py')
-rw-r--r--src/leap/common/testing/basetest.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/leap/common/testing/basetest.py b/src/leap/common/testing/basetest.py
index 3d3cee0..2e84a25 100644
--- a/src/leap/common/testing/basetest.py
+++ b/src/leap/common/testing/basetest.py
@@ -52,7 +52,7 @@ class BaseLeapTest(unittest.TestCase):
cls.tearDownEnv()
@classmethod
- def setUpEnv(cls):
+ def setUpEnv(cls, launch_events_server=True):
"""
Sets up common facilities for testing this TestCase:
- custom PATH and HOME environmental variables
@@ -72,14 +72,15 @@ class BaseLeapTest(unittest.TestCase):
os.environ["PATH"] = bin_tdir
os.environ["HOME"] = cls.tempdir
os.environ["XDG_CONFIG_HOME"] = os.path.join(cls.tempdir, ".config")
- cls._init_events()
+ if launch_events_server:
+ cls._init_events()
@classmethod
def _init_events(cls):
if flags.EVENTS_ENABLED:
cls._server = events_server.ensure_server(
- emit_addr="tcp://127.0.0.1:0",
- reg_addr="tcp://127.0.0.1:0")
+ emit_addr="tcp://127.0.0.1",
+ reg_addr="tcp://127.0.0.1")
events_client.configure_client(
emit_addr="tcp://127.0.0.1:%d" % cls._server.pull_port,
reg_addr="tcp://127.0.0.1:%d" % cls._server.pub_port)