summaryrefslogtreecommitdiff
path: root/tests/commands
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-07-18 13:53:40 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-07-26 10:36:53 -0700
commitd5b96fd2d39aebce0f8ca22c37aa5a3830e1d643 (patch)
tree52b96524348a4fe1ca5051ecf178b72c37661a08 /tests/commands
parent408724291ccd60f6cbd56208592a49badee16770 (diff)
tests: drop remaining references to twisted from unit tests
all unittests now use asyncio and the standard unittest framework.
Diffstat (limited to 'tests/commands')
-rw-r--r--tests/commands/envelope_test.py3
-rw-r--r--tests/commands/global_test.py8
-rw-r--r--tests/commands/utils_tests.py2
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