summaryrefslogtreecommitdiff
path: root/service/test/unit/config
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-11-23 11:31:22 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-11-23 11:41:24 +0100
commit6cb474e3fee165f51c414634ec88380b9a50c5fc (patch)
treea4376d40dbee481714e3a43c5db37cdba595d805 /service/test/unit/config
parent8d8cfea0713ea5b0375ab0dcb6bfde56fd7a2156 (diff)
replace stdlib's unittest with trials's unittest for all unittest
Diffstat (limited to 'service/test/unit/config')
-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
4 files changed, 4 insertions, 3 deletions
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