diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-07-18 13:32:13 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-07-26 10:36:16 -0700 |
commit | 603b4d8ea381f971a840ce099741786ebcaa3b2a (patch) | |
tree | 03beca863e89e1badf5aaf1edf6b8de352a397ec /tests | |
parent | 781d0a824d5c08277ac73093a4846bd4f6dd2ff6 (diff) |
ui: switch ui.prompt and ui.choice to use asyncio.Futures
asyncio's Futures are much like twisted's Deferreds, they represent a
value that is not yet available, and they can be awaited like a
coroutine.
For the moment we still need to return a deferred because the twisted
eventloop doesn't use Futures, it uses Deferreds; once we can remove
twisted's eventloop we can remove the conversion from a Future to a
deferred.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/commands/utils_tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/commands/utils_tests.py b/tests/commands/utils_tests.py index f88244a5..cfa8a8dc 100644 --- a/tests/commands/utils_tests.py +++ b/tests/commands/utils_tests.py @@ -21,7 +21,6 @@ import shutil import gpg import mock from twisted.trial import unittest -from twisted.internet.defer import inlineCallbacks from alot import crypto from alot import errors @@ -110,7 +109,7 @@ class TestGetKeys(unittest.TestCase): FPR, validate=True, encrypt=True, signed_only=False) ui = utilities.make_ui() - # Creat a ui.choice object that can satisfy twisted, but can also be + # Creat a ui.choice object that can satisfy asyncio, but can also be # queried for calls as a mock async def choice(*args, **kwargs): return None |