summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/adapter/mailstore/test_body_parser.py2
-rw-r--r--service/test/unit/adapter/search/test_search.py2
-rw-r--r--service/test/unit/adapter/test_contacts.py2
-rw-r--r--service/test/unit/adapter/test_draft_service.py2
-rw-r--r--service/test/unit/adapter/test_status.py2
-rw-r--r--service/test/unit/adapter/test_tag.py2
-rw-r--r--service/test/unit/bitmask_libraries/test_abstract_leap.py2
-rw-r--r--service/test/unit/bitmask_libraries/test_certs.py2
-rw-r--r--service/test/unit/bitmask_libraries/test_smtp_client_certificate.py2
-rw-r--r--service/test/unit/config/test_register.py2
-rw-r--r--service/test/unit/config/test_services.py2
-rw-r--r--service/test/unit/config/test_sessions.py1
-rw-r--r--service/test/unit/config/test_site.py2
-rw-r--r--service/test/unit/maintenance/test_commands.py2
-rw-r--r--service/test/unit/resources/test_attachments_resource.py2
-rw-r--r--service/test/unit/resources/test_helpers.py2
-rw-r--r--service/test/unit/resources/test_sandbox_resource.py2
-rw-r--r--service/test/unit/resources/test_user_settings_resource.py2
-rw-r--r--service/test/unit/support/mail_generator_test.py2
-rw-r--r--service/test/unit/support/test_encrypted_file_storage.py2
-rw-r--r--service/test/unit/support/test_functional.py2
-rw-r--r--service/test/unit/support/test_markov.py2
-rw-r--r--service/test/unit/support/test_replier.py2
-rw-r--r--service/test/unit/test_application.py2
-rw-r--r--service/test/unit/test_welcome_mail.py2
25 files changed, 25 insertions, 24 deletions
diff --git a/service/test/unit/adapter/mailstore/test_body_parser.py b/service/test/unit/adapter/mailstore/test_body_parser.py
index 155b326c..cff0b09e 100644
--- a/service/test/unit/adapter/mailstore/test_body_parser.py
+++ b/service/test/unit/adapter/mailstore/test_body_parser.py
@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from mock import patch
from pixelated.adapter.mailstore.body_parser import BodyParser
diff --git a/service/test/unit/adapter/search/test_search.py b/service/test/unit/adapter/search/test_search.py
index be37257c..1465961d 100644
--- a/service/test/unit/adapter/search/test_search.py
+++ b/service/test/unit/adapter/search/test_search.py
@@ -16,7 +16,7 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from pixelated.adapter.mailstore.leap_mailstore import LeapMail
from pixelated.adapter.search import SearchEngine
from tempdir import TempDir
diff --git a/service/test/unit/adapter/test_contacts.py b/service/test/unit/adapter/test_contacts.py
index 3510faf5..83383755 100644
--- a/service/test/unit/adapter/test_contacts.py
+++ b/service/test/unit/adapter/test_contacts.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from pixelated.adapter.search.contacts import address_duplication_filter
from pixelated.adapter.search.contacts import extract_mail_address
diff --git a/service/test/unit/adapter/test_draft_service.py b/service/test/unit/adapter/test_draft_service.py
index c2516013..e18589eb 100644
--- a/service/test/unit/adapter/test_draft_service.py
+++ b/service/test/unit/adapter/test_draft_service.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
from twisted.internet import defer
from pixelated.adapter.mailstore.leap_mailstore import LeapMail
diff --git a/service/test/unit/adapter/test_status.py b/service/test/unit/adapter/test_status.py
index 5cd0fa1e..4624dcee 100644
--- a/service/test/unit/adapter/test_status.py
+++ b/service/test/unit/adapter/test_status.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from pixelated.adapter.model.status import Status
diff --git a/service/test/unit/adapter/test_tag.py b/service/test/unit/adapter/test_tag.py
index a4fa819e..e6d2771d 100644
--- a/service/test/unit/adapter/test_tag.py
+++ b/service/test/unit/adapter/test_tag.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from pixelated.adapter.model.tag import Tag
diff --git a/service/test/unit/bitmask_libraries/test_abstract_leap.py b/service/test/unit/bitmask_libraries/test_abstract_leap.py
index 237a1152..2fed2a4c 100644
--- a/service/test/unit/bitmask_libraries/test_abstract_leap.py
+++ b/service/test/unit/bitmask_libraries/test_abstract_leap.py
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import tempfile
-import unittest
+from twisted.trial import unittest
from uuid import uuid4
import os
diff --git a/service/test/unit/bitmask_libraries/test_certs.py b/service/test/unit/bitmask_libraries/test_certs.py
index 9885759e..300830be 100644
--- a/service/test/unit/bitmask_libraries/test_certs.py
+++ b/service/test/unit/bitmask_libraries/test_certs.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
from pixelated.bitmask_libraries.certs import LeapCertificate
from pixelated.config import leap_config
diff --git a/service/test/unit/bitmask_libraries/test_smtp_client_certificate.py b/service/test/unit/bitmask_libraries/test_smtp_client_certificate.py
index 241dcbae..1ed08653 100644
--- a/service/test/unit/bitmask_libraries/test_smtp_client_certificate.py
+++ b/service/test/unit/bitmask_libraries/test_smtp_client_certificate.py
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import os
-import unittest
+from twisted.trial import unittest
import tempdir
import leap.common.certs as certs
from mockito import mock, unstub, when, any as ANY
diff --git a/service/test/unit/config/test_register.py b/service/test/unit/config/test_register.py
index ca1e3a01..1d7918c4 100644
--- a/service/test/unit/config/test_register.py
+++ b/service/test/unit/config/test_register.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
from mock import patch, Mock
from pixelated.register import validate_username, validate_password, _set_provider, register
diff --git a/service/test/unit/config/test_services.py b/service/test/unit/config/test_services.py
index ed221261..6361a3da 100644
--- a/service/test/unit/config/test_services.py
+++ b/service/test/unit/config/test_services.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from mock import Mock, ANY, patch
from mockito import mock, verify
diff --git a/service/test/unit/config/test_sessions.py b/service/test/unit/config/test_sessions.py
index 7ac6f8d1..5c5cf9be 100644
--- a/service/test/unit/config/test_sessions.py
+++ b/service/test/unit/config/test_sessions.py
@@ -53,6 +53,7 @@ class SessionTest(AbstractLeapTest):
session.close()
mail_fetcher_mock.stopService.assert_called_once()
+ @defer.inlineCallbacks
def test_that_sync_defers_to_soledad(self):
with patch('pixelated.config.sessions.reactor.callFromThread', new=_execute_func) as _:
with patch('pixelated.config.sessions.LeapSession._create_incoming_mail_fetcher') as mail_fetcher_mock:
diff --git a/service/test/unit/config/test_site.py b/service/test/unit/config/test_site.py
index b8b23ef0..6911b4a5 100644
--- a/service/test/unit/config/test_site.py
+++ b/service/test/unit/config/test_site.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
from mockito import mock
from pixelated.config.site import PixelatedSite
from twisted.protocols.basic import LineReceiver
diff --git a/service/test/unit/maintenance/test_commands.py b/service/test/unit/maintenance/test_commands.py
index 812c1bc2..0a8ffe53 100644
--- a/service/test/unit/maintenance/test_commands.py
+++ b/service/test/unit/maintenance/test_commands.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
import email
from pixelated.maintenance import delete_all_mails, load_mails
diff --git a/service/test/unit/resources/test_attachments_resource.py b/service/test/unit/resources/test_attachments_resource.py
index 06ae765f..15f38406 100644
--- a/service/test/unit/resources/test_attachments_resource.py
+++ b/service/test/unit/resources/test_attachments_resource.py
@@ -1,5 +1,5 @@
import json
-import unittest
+from twisted.trial import unittest
from mock import patch, MagicMock
from mockito import mock, when, verify, any as ANY
diff --git a/service/test/unit/resources/test_helpers.py b/service/test/unit/resources/test_helpers.py
index a17ce755..25a52da2 100644
--- a/service/test/unit/resources/test_helpers.py
+++ b/service/test/unit/resources/test_helpers.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
import re
from pixelated.resources import respond_json, respond_json_deferred
diff --git a/service/test/unit/resources/test_sandbox_resource.py b/service/test/unit/resources/test_sandbox_resource.py
index 98b88b2d..4f263af1 100644
--- a/service/test/unit/resources/test_sandbox_resource.py
+++ b/service/test/unit/resources/test_sandbox_resource.py
@@ -1,5 +1,5 @@
import os
-import unittest
+from twisted.trial import unittest
from twisted.internet import defer
from twisted.web.test.requesthelper import DummyRequest
diff --git a/service/test/unit/resources/test_user_settings_resource.py b/service/test/unit/resources/test_user_settings_resource.py
index 30a3c4cd..e9748e72 100644
--- a/service/test/unit/resources/test_user_settings_resource.py
+++ b/service/test/unit/resources/test_user_settings_resource.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
import json
import ast
diff --git a/service/test/unit/support/mail_generator_test.py b/service/test/unit/support/mail_generator_test.py
index 9d604378..dd6da522 100644
--- a/service/test/unit/support/mail_generator_test.py
+++ b/service/test/unit/support/mail_generator_test.py
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
from mailbox import mbox
-import unittest
+from twisted.trial import unittest
import pkg_resources
import random
from mock import patch
diff --git a/service/test/unit/support/test_encrypted_file_storage.py b/service/test/unit/support/test_encrypted_file_storage.py
index 69b82f3d..8083430e 100644
--- a/service/test/unit/support/test_encrypted_file_storage.py
+++ b/service/test/unit/support/test_encrypted_file_storage.py
@@ -15,7 +15,7 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import os
import shutil
-import unittest
+from twisted.trial import unittest
from pixelated.support.encrypted_file_storage import EncryptedFileStorage
diff --git a/service/test/unit/support/test_functional.py b/service/test/unit/support/test_functional.py
index ad3cb16c..0b117032 100644
--- a/service/test/unit/support/test_functional.py
+++ b/service/test/unit/support/test_functional.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Affero General Public License
-import unittest
+from twisted.trial import unittest
from pixelated.support.functional import to_unicode
diff --git a/service/test/unit/support/test_markov.py b/service/test/unit/support/test_markov.py
index f0b0277d..911cef30 100644
--- a/service/test/unit/support/test_markov.py
+++ b/service/test/unit/support/test_markov.py
@@ -15,7 +15,7 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-import unittest
+from twisted.trial import unittest
from pixelated.support.markov import MarkovGenerator
import random
diff --git a/service/test/unit/support/test_replier.py b/service/test/unit/support/test_replier.py
index 5e1c234a..ef9b321c 100644
--- a/service/test/unit/support/test_replier.py
+++ b/service/test/unit/support/test_replier.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
from pixelated.support import replier
diff --git a/service/test/unit/test_application.py b/service/test/unit/test_application.py
index 80d9ec14..67c044c2 100644
--- a/service/test/unit/test_application.py
+++ b/service/test/unit/test_application.py
@@ -1,4 +1,4 @@
-import unittest
+from twisted.trial import unittest
from leap.common.events import catalog as events
from mock import patch, MagicMock, ANY
diff --git a/service/test/unit/test_welcome_mail.py b/service/test/unit/test_welcome_mail.py
index 6462dceb..7eb65903 100644
--- a/service/test/unit/test_welcome_mail.py
+++ b/service/test/unit/test_welcome_mail.py
@@ -16,7 +16,7 @@
import os
import re
-import unittest
+from twisted.trial import unittest
from mockito import verify, mock
from mockito.matchers import Matcher
from email import message_from_file