diff options
Diffstat (limited to 'tests/commands/envelope_test.py')
-rw-r--r-- | tests/commands/envelope_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/commands/envelope_test.py b/tests/commands/envelope_test.py index 5f69ae43..d3908be8 100644 --- a/tests/commands/envelope_test.py +++ b/tests/commands/envelope_test.py @@ -22,7 +22,7 @@ import tempfile import textwrap from twisted.trial import unittest -from twisted.internet.defer import inlineCallbacks +from twisted.internet.defer import inlineCallbacks, ensureDeferred import mock @@ -360,7 +360,7 @@ class TestSendCommand(unittest.TestCase): with mock.patch( 'alot.commands.envelope.settings.get_account_by_address', mock.Mock(return_value=account)) as get_account_by_address: - yield cmd.apply(mock.Mock()) + yield ensureDeferred(cmd.apply(mock.Mock())) get_account_by_address.assert_called_once_with('foo@example.com', return_default=True) # check that the apply did run through till the end. @@ -374,7 +374,7 @@ class TestSendCommand(unittest.TestCase): with mock.patch( 'alot.commands.envelope.settings.get_account_by_address', mock.Mock(return_value=account)) as get_account_by_address: - yield cmd.apply(mock.Mock()) + yield ensureDeferred(cmd.apply(mock.Mock())) get_account_by_address.assert_called_once_with('foo@example.com', return_default=True) # check that the apply did run through till the end. |