diff options
author | Bruno Wagner Goncalves <bwagner@thoughtworks.com> | 2014-08-29 14:55:49 -0300 |
---|---|---|
committer | Bruno Wagner Goncalves <bwagner@thoughtworks.com> | 2014-08-29 14:55:49 -0300 |
commit | ef16ab45270e3591d16cbf90196884980a600995 (patch) | |
tree | f5f7400236f755d8385825ae73e81120b531e903 | |
parent | 9700427e9287eba766cbdae0fdc9afba2492b9ac (diff) |
Fixed smtp tests
-rw-r--r-- | service/pixelated/bitmask_libraries/smtp.py | 4 | ||||
-rw-r--r-- | service/test/bitmask_libraries/smtp_test.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/service/pixelated/bitmask_libraries/smtp.py b/service/pixelated/bitmask_libraries/smtp.py index b298e1ef..3902d234 100644 --- a/service/pixelated/bitmask_libraries/smtp.py +++ b/service/pixelated/bitmask_libraries/smtp.py @@ -31,7 +31,7 @@ class LeapSmtp(object): self._hostname, self._port = self._discover_smtp_server() self._smtp_port = None self._smtp_service = None - print('Running on port %d' % TWISTED_PORT) + print('Running on port %d' % self.TWISTED_PORT) def smtp_info(self): return ('localhost', self._twisted_port) @@ -78,7 +78,7 @@ class LeapSmtp(object): email = '%s@%s' % (self._srp_session.user_name, self._provider.domain) self._smtp_service, self._smtp_port = setup_smtp_gateway( - port=self._twisted_port, + port=self.TWISTED_PORT, userid=email, keymanager=self._keymanager, smtp_host=self._hostname.encode('UTF-8'), diff --git a/service/test/bitmask_libraries/smtp_test.py b/service/test/bitmask_libraries/smtp_test.py index 283d882e..2bb3dcab 100644 --- a/service/test/bitmask_libraries/smtp_test.py +++ b/service/test/bitmask_libraries/smtp_test.py @@ -66,7 +66,7 @@ class LeapSmtpTest(AbstractLeapTest): def test_that_start_calls_setup_smtp_gateway(self, gateway_mock): smtp = LeapSmtp(self.provider, self.keymanager, self.srp_session) port = 500 - smtp._twisted_port = port + smtp.TWISTED_PORT = port gateway_mock.return_value = (None, None) with HTTMock(ca_cert_mock, not_found_mock): smtp.start() |