summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* tests: drop remaining references to twisted from unit testsDylan Baker2018-07-26
| | | | all unittests now use asyncio and the standard unittest framework.
* ui: switch ui.prompt and ui.choice to use asyncio.FuturesDylan Baker2018-07-26
| | | | | | | | | | | 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.
* account: Convert send_mail function to coroutineDylan Baker2018-07-26
|
* tests/commands/global: use utilities.async_testDylan Baker2018-07-26
|
* tests/commands/envelope: use utilities.async_testDylan Baker2018-07-26
|
* tests/commands/utils: use utilities.async_testDylan Baker2018-07-26
|
* helper: use asyncio.subprocess instead of twistedDylan Baker2018-07-26
|
* utilities: Add a decorator for asyncio testsDylan Baker2018-07-26
| | | | | This decorator works to allow tests for pure asyncio coroutines to operate synchronously.
* commands/globals: implement ExternalCommand.apply as coroutineDylan Baker2018-07-26
| | | | | | Rather than returning a deferred in some cases, this makes the function a coroutine, in some cases it calls regular subprocess, in other cases it uses asyncio subprocess.
* commands/globals: Use asyncio coroutines instead of twisted deferredsDylan Baker2018-07-26
|
* command/envelope: use asyncio coroutines instead of twisted inlineCallbacksDylan Baker2018-07-26
|
* commands/globals: Convert Address to string for email.utilsDylan Baker2018-07-25
| | | | | | | | Email utils apparently assumes it's getting a string, and calls encode directly. This can only be hit if you have a single account configured, not with multiple accounts. Fixes #1277
* tests for alot.db.managerPatrick Totzke2018-07-24
| | | | | This adds a new TestCase for the database manager and adds a test for saving/reading named query strings to the database.
* update theme spec, default theme and testsPatrick Totzke2018-07-24
| | | | | | | | | | This patchseries adds a new buffer type for displaying notmuch's saved querystrings. This commit adds the respective theming attributes used in the new buffer. They are just copies of the taglist buffer really. THIS BREAKS COMPATIBILITY WITH USER THEMES! The theme files need to be updated to also have these new attributes in order to conform with the updated spec.
* Merge pull request #1252 from pazz/update-envelope-keysDylan Baker2018-07-24
|\ | | | | fix: automatically update envelope gpg keys only if requested. see #1228
| * rename function that updates gpg keys in envelopesPatrick Totzke2018-06-21
| |
* | Remove pre py3 monkey patchLucas Hoffmann2018-07-22
| |
* | Merge pull request #1266 from mjg/message-from-bytesDylan Baker2018-07-17
|\ \ | | | | | | Message from bytes
| * | rename message_from_ functionsMichael J Gruber2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our message_from_functions decrypt PGP encryped parts in addition to creating a message object (from bytes or file handles) and recognizing the encoding in one way or the other. Rename them before refactoring to make their function clearer and to distinguish them from the email.message_from_ functions (which do not decrypt).
* | | Add simple test case for helper.parse_mailtoJohannes Löthberg2018-07-16
|/ / | | | | | | Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* / update tests for SettingsManagerPatrick Totzke2018-06-21
|/ | | | | | | - SettingsManagers is now instantiated without config paths and instead `read_[notmuch]config` is called separately - test_no_user_setting_* are removed, because we do not need to test what config path SettingsManager uses anymore (this is now explicit)
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* Fix bad refactor of a testDylan Baker2018-05-07
|
* Fix some formatting requests for @luccDylan Baker2018-04-24
|
* Revert "Extract some context managers for patch objects."Dylan Baker2018-04-24
| | | | | | | | This reverts commit d01d2e51da45dd87f0abf98b8a856f3b3de69153. I don't think that this patch really improved readability that much. The right solution is to split ComposeCommand.apply so we don't need so many mocks.
* Wrap long statements on open-bracket syntax.Ben Finney2018-04-23
|
* Refactor some long statements to allow shorter lines.Ben Finney2018-04-23
|
* Rename some test functions to have shorter names.Ben Finney2018-04-23
|
* Extract some context managers for patch objects.Ben Finney2018-04-23
| | | | This allows writing less-nested statements.
* db/utils: decoded_headers will be passed str not bytesDylan Baker2018-03-12
| | | | | | | I had made the assumption early on that this would get bytes, but when I added `assert isinstance(header, bytes)` alot would crash on startup, changing `bytes` to `str` fixed that. I noticed this when trying to fix the warning generated in the logging call.
* drop bytes support from AddressDylan Baker2018-03-06
| | | | | | We don't want to be comparing bytes anyway, the decode would use utf-8, and that isn't right. Instead make the caller convert to a str of Address first.
* Use urwid.util.detected_encoding instead of try_decodeDylan Baker2018-03-06
| | | | | Commands running in a subprocess should return the terminal encoding so we don't need to guess their encoding.
* tests/commands/utils_tests: use assertCountEqual for comparing listsDylan Baker2018-03-01
| | | | | Which compares that the lists have the same elements, but doesn't check their order.
* tests/command/utils_tests: fix for py3kDylan Baker2018-03-01
|
* Fix some of the quoted words tests for py3kDylan Baker2018-03-01
|
* fix a bunch of utils tests for py3kDylan Baker2018-03-01
| | | | | There are a few that are still broken because of bytes to unicode conversion, and this may not all be correct, but most of the tests pass
* helper: py3k fixesDylan Baker2018-03-01
|
* alot/command/envelope: py3k fixesDylan Baker2018-03-01
|
* tests/addressbook/abook_test: fix for py3kDylan Baker2018-03-01
|
* tests/db/thread: Fix tests for py3kDylan Baker2018-03-01
|
* settings/manager: fix managerDylan Baker2018-03-01
|
* crypto: use bytes instead of strDylan Baker2018-03-01
| | | | | | | | The crypto code shouldn't use unicode strings, it should use byte strings. The problem with using unicode strings (and doing the conversion internally), is that the crypto code doesn't know what the encoding should be. We can guess but it's better to just do bytes in bytes out, and let the calling code deal with encoding and decoding.
* Fix cryptoDylan Baker2018-03-01
| | | | | | This makes me a little nervous. I wonder if we're better off leaving the bits that gpg works with as bytes while gpg is working with them and do the string transformation later.
* fix account.pyDylan Baker2018-03-01
|
* replace xrange with rangeDylan Baker2018-03-01
| | | | In python 3 xrange is range, to get a list one must wrap range in list.
* Move screen stop/start logic into context manager.Thomas Nixon2018-02-19
| | | | | | | As well as reducing duplication and adding screen size detection to :pipeto and :pyshell, this ensures that the screen is always restarted, resulting in cleaner error handling if an error occurs while the screen is stopped.
* Move mock ui creation to function.Thomas Nixon2018-02-19
|
* Add test: template not decoded properly.Julian Mehne2018-02-15
|
* Expand environment variables when reading the config file.Julian Mehne2018-01-23
|
* Set changed values in mock.patch.dict call itself.Julian Mehne2018-01-23
|