diff options
author | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-23 11:31:22 +0100 |
---|---|---|
committer | Roald de Vries <rdevries@thoughtworks.com> | 2016-11-23 11:41:24 +0100 |
commit | 6cb474e3fee165f51c414634ec88380b9a50c5fc (patch) | |
tree | a4376d40dbee481714e3a43c5db37cdba595d805 /service/test/unit/config | |
parent | 8d8cfea0713ea5b0375ab0dcb6bfde56fd7a2156 (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.py | 2 | ||||
-rw-r--r-- | service/test/unit/config/test_services.py | 2 | ||||
-rw-r--r-- | service/test/unit/config/test_sessions.py | 1 | ||||
-rw-r--r-- | service/test/unit/config/test_site.py | 2 |
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 |