diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-06-19 22:21:47 +0200 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-06-19 22:21:47 +0200 |
commit | ea6e88d0e68309deba304c92d6cae5f31046e8b6 (patch) | |
tree | 03f0a4e082976a04ee8999573378da3a2b15834b /service/test/unit/bitmask_libraries | |
parent | 89c9a1e1836098e2e55a225943d29e6d6474c240 (diff) |
[refactor] Use auth for fewer parameters
Diffstat (limited to 'service/test/unit/bitmask_libraries')
-rw-r--r-- | service/test/unit/bitmask_libraries/test_smtp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/service/test/unit/bitmask_libraries/test_smtp.py b/service/test/unit/bitmask_libraries/test_smtp.py index 535b1e7a..ec51c56b 100644 --- a/service/test/unit/bitmask_libraries/test_smtp.py +++ b/service/test/unit/bitmask_libraries/test_smtp.py @@ -53,7 +53,7 @@ class LeapSmtpTest(AbstractLeapTest): self.config.timeout_in_s = 15 def test_that_client_cert_gets_downloaded(self): - smtp = LeapSmtp(self.provider, self.auth.username, self.auth.session_id, self.keymanager) + smtp = LeapSmtp(self.provider, self.auth, self.keymanager) with HTTMock(ca_cert_mock, not_found_mock): smtp._download_client_certificates() @@ -66,7 +66,7 @@ class LeapSmtpTest(AbstractLeapTest): @patch('pixelated.bitmask_libraries.smtp.setup_smtp_gateway') def test_that_start_calls_setup_smtp_gateway(self, gateway_mock): - smtp = LeapSmtp(self.provider, self.auth.username, self.auth.session_id, self.auth.token, self.keymanager) + smtp = LeapSmtp(self.provider, self.auth, self.keymanager) port = 500 smtp.local_smtp_port_number = port @@ -78,14 +78,14 @@ class LeapSmtpTest(AbstractLeapTest): gateway_mock.assert_called_with(keymanager=self.keymanager, smtp_cert=cert_path, smtp_key=cert_path, userid='test_user@some-server.test', smtp_port='1234', encrypted_only=False, smtp_host='smtp.some-sever.test', port=port) def test_that_client_stop_does_nothing_if_not_started(self): - smtp = LeapSmtp(self.provider, self.auth.username, self.auth.session_id, self.keymanager) + smtp = LeapSmtp(self.provider, self.auth, self.keymanager) with HTTMock(not_found_mock): smtp.stop() @patch('pixelated.bitmask_libraries.smtp.setup_smtp_gateway') def test_that_running_smtp_sevice_is_stopped(self, gateway_mock): - smtp = LeapSmtp(self.provider, self.auth.username, self.auth.session_id, self.keymanager) + smtp = LeapSmtp(self.provider, self.auth, self.keymanager) smtp_service = MagicMock() smtp_port = MagicMock() |