From 018d3f0eea4f698a2e3f3aad313b26982e8b0099 Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 17 Feb 2019 13:41:51 +0000 Subject: commands/globals simplify test for issue #1277 --- tests/commands/test_global.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests') 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): -- cgit v1.2.3