summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2019-02-17 13:41:51 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2019-05-11 17:37:57 +0100
commit018d3f0eea4f698a2e3f3aad313b26982e8b0099 (patch)
tree6dfbd0d7a0819e45a907eb8c770362b200937258 /tests
parent10c1c2cec85c767f345017915c2b017851e5fce2 (diff)
commands/globals simplify test for issue #1277
Diffstat (limited to 'tests')
-rw-r--r--tests/commands/test_global.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/commands/test_global.py b/tests/commands/test_global.py
index 3d69bd04..92b48955 100644
--- a/tests/commands/test_global.py
+++ b/tests/commands/test_global.py
@@ -115,12 +115,10 @@ class TestComposeCommand(unittest.TestCase):
envelope.account.address = 1 # maybe this should be a real Address?
cmd = g_commands.ComposeCommand(envelope=envelope)
- with mock.patch('alot.commands.globals.settings.get_addressbooks',
- mock.Mock(side_effect=Stop)):
- try:
- await cmd.apply(mock.Mock())
- except Stop:
- pass
+ cmd._set_envelope()
+ with mock.patch('alot.commands.globals.settings.get_accounts',
+ mock.Mock(return_value=[account])):
+ await cmd._set_from()
class TestExternalCommand(unittest.TestCase):