summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2019-02-17 13:39:07 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2019-05-11 17:37:57 +0100
commitacdecb9010df7600cff86da1bfbf579bc25f71cf (patch)
tree941579f1531336114e4c1b5b38f1a9cf782313da /tests
parent7df100d9ac4b81d6c6a4d214b8d00b581292f539 (diff)
tests/commands/globals: Simplify template_decode test
Diffstat (limited to 'tests')
-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],