summaryrefslogtreecommitdiff
path: root/service/test/bitmask_libraries/smtp_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/bitmask_libraries/smtp_test.py')
-rw-r--r--service/test/bitmask_libraries/smtp_test.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/service/test/bitmask_libraries/smtp_test.py b/service/test/bitmask_libraries/smtp_test.py
index 3982a50c..ed5fc520 100644
--- a/service/test/bitmask_libraries/smtp_test.py
+++ b/service/test/bitmask_libraries/smtp_test.py
@@ -1,9 +1,9 @@
+import os
from mock import MagicMock, patch
from abstract_leap_test import AbstractLeapTest
from app.bitmask_libraries.smtp import LeapSmtp
from httmock import all_requests, HTTMock, urlmatch
-import os
-import sys
+
@all_requests
def not_found_mock(url, request):
@@ -12,6 +12,7 @@ def not_found_mock(url, request):
return {'status_code': 404,
'content': 'foobar'}
+
@urlmatch(netloc='api.some-server.test:4430', path='/1/cert')
def ca_cert_mock(url, request):
return {
@@ -19,6 +20,7 @@ def ca_cert_mock(url, request):
"content": "some content"
}
+
class LeapSmtpTest(AbstractLeapTest):
keymanager = MagicMock()
@@ -26,7 +28,7 @@ class LeapSmtpTest(AbstractLeapTest):
self.provider.fetch_smtp_json.return_value = {
'hosts': {
'leap-mx': {
- 'hostname': 'smtp.some-sever.test',
+ 'hostname': 'smtp.some-sever.test',
'port': '1234'
}
}