diff options
Diffstat (limited to 'tests/commands')
-rw-r--r-- | tests/commands/envelope_test.py | 3 | ||||
-rw-r--r-- | tests/commands/global_test.py | 8 | ||||
-rw-r--r-- | tests/commands/utils_tests.py | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/tests/commands/envelope_test.py b/tests/commands/envelope_test.py index 8261da34..3efce261 100644 --- a/tests/commands/envelope_test.py +++ b/tests/commands/envelope_test.py @@ -20,8 +20,7 @@ import email import os import tempfile import textwrap - -from twisted.trial import unittest +import unittest import mock diff --git a/tests/commands/global_test.py b/tests/commands/global_test.py index 2c6fd845..88c7bc99 100644 --- a/tests/commands/global_test.py +++ b/tests/commands/global_test.py @@ -18,8 +18,8 @@ import os import tempfile +import unittest -from twisted.trial import unittest import mock from alot.commands import globals as g_commands @@ -148,8 +148,8 @@ class TestComposeCommand(unittest.TestCase): 'Subject': [subject]}, cmd.envelope.headers) self.assertEqual(body, cmd.envelope.body) - @inlineCallbacks - def test_single_account_no_from(self): + @utilities.async_test + async def test_single_account_no_from(self): # issue #1277 envelope = self._make_envelope_mock() del envelope.headers['From'] @@ -167,7 +167,7 @@ class TestComposeCommand(unittest.TestCase): with mock.patch('alot.commands.globals.settings.get_addressbooks', mock.Mock(side_effect=Stop)): try: - yield ensureDeferred(cmd.apply(mock.Mock())) + await cmd.apply(mock.Mock()) except Stop: pass diff --git a/tests/commands/utils_tests.py b/tests/commands/utils_tests.py index cfa8a8dc..639fb1cd 100644 --- a/tests/commands/utils_tests.py +++ b/tests/commands/utils_tests.py @@ -17,10 +17,10 @@ import tempfile import os import shutil +import unittest import gpg import mock -from twisted.trial import unittest from alot import crypto from alot import errors |