summaryrefslogtreecommitdiff
path: root/tests/commands/test_global.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/commands/test_global.py')
-rw-r--r--tests/commands/test_global.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/commands/test_global.py b/tests/commands/test_global.py
index 9b026e6a..dad7412c 100644
--- a/tests/commands/test_global.py
+++ b/tests/commands/test_global.py
@@ -103,8 +103,7 @@ class TestComposeCommand(unittest.TestCase):
self.assertFalse(envelope.sign)
self.assertIs(envelope.sign_key, None)
- @utilities.async_test
- async def test_decode_template_on_loading(self):
+ def test_decode_template_on_loading(self):
subject = u'This is a täßϑ subject.'
to = u'recipient@mail.com'
_from = u'foo.bar@mail.fr'
@@ -116,15 +115,8 @@ class TestComposeCommand(unittest.TestCase):
self.addCleanup(os.unlink, f.name)
cmd = g_commands.ComposeCommand(template=f.name)
-
- # Crutch to exit the giant `apply` method early.
- with mock.patch(
- 'alot.commands.globals.settings.get_accounts',
- mock.Mock(side_effect=Stop)):
- try:
- await cmd.apply(mock.Mock())
- except Stop:
- pass
+ cmd._set_envelope()
+ cmd._get_template(mock.Mock())
self.assertEqual({'To': [to],
'From': [_from],