summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-07-29 12:57:46 -0300
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 17:00:29 +0200
commit5c910869c81507ef94924ab08e14314727d701b0 (patch)
treecbb650e50a7c66c1c9d665644525fe39903ce946
parent14ff31c1d73d73f471cb1ffbb04eb822994f2f1d (diff)
patch leap.common for unit testing
-rw-r--r--service/test/unit/test_application.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/service/test/unit/test_application.py b/service/test/unit/test_application.py
index b2799d4c..16317ee5 100644
--- a/service/test/unit/test_application.py
+++ b/service/test/unit/test_application.py
@@ -14,9 +14,11 @@ class ApplicationTest(unittest.TestCase):
self.sslcert = sslcert
self.home = 'leap_home'
+ @patch('leap.common.events.client')
@patch('pixelated.application.reactor')
@patch('pixelated.application.Services')
- def test_that_create_app_binds_to_tcp_port_if_no_ssl_options(self, services_mock, reactor_mock):
+ def test_that_create_app_binds_to_tcp_port_if_no_ssl_options(self, services_mock, reactor_mock, _):
+ # FIXME patch something closer, instead of leap.common
app_mock = MagicMock()
leap_session = MagicMock()
config = ApplicationTest.MockConfig(12345, '127.0.0.1', leap_session)
@@ -32,9 +34,11 @@ class ApplicationTest(unittest.TestCase):
d.addCallback(_assert)
return d
+ @patch('leap.common.events.client')
@patch('pixelated.application.reactor')
@patch('pixelated.application.Services')
- def test_that_create_app_binds_to_ssl_if_ssl_options(self, services_mock, reactor_mock):
+ def test_that_create_app_binds_to_ssl_if_ssl_options(self, services_mock, reactor_mock, _):
+ # FIXME patch something closer, instead of leap.common
app_mock = MagicMock()
leap_session = MagicMock()
pixelated.application._ssl_options = lambda x, y: 'options'