summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* tests: db.utils.formataddrPatrick Totzke2019-06-02
|
* tests: move tests for db.utils.clear_my_addressPatrick Totzke2019-06-02
|
* tests: move test for utils.ensure_unique_addressPatrick Totzke2019-06-02
|
* tests: add case for exchange formatted realnamesPatrick Totzke2019-05-27
|
* fix testsPatrick Totzke2019-05-11
| | | | | ComposeCommand._set_gpg_sign will now read off the account from self.envelope and not separate parameters.
* remove test for ComposeCommand._set_from..Patrick Totzke2019-05-11
| | | | .. which was replaced earlier
* fix pyflakes issuesPatrick Totzke2019-05-11
|
* tests/commands/globals: Rename tests to better fit the methods they testDylan Baker2019-05-11
|
* commands/globals simplify test for issue #1277Patrick Totzke2019-05-11
|
* tests/commands/globals: Simplify signing testsPatrick Totzke2019-05-11
|
* tests/commands/globals: Simplify template_decode testPatrick Totzke2019-05-11
|
* restore lenient libmagic decodingMichael J Gruber2019-02-07
| | | | | | | | 176cffcd ("refactor alot.db.utils.remove_cte", 2018-12-04) created a few problems with 8bit quoted-printable e-mails, see #1291 #1360. This commit restores the old libmagic fallback which did not cause this problem.
* Rename test filesLucas Hoffmann2019-01-29
| | | | | | | | The two main reasons are - to run `python3 -m unittest discover` without specifying a custom `--pattern *_test.py` - to include the test files automatically when generating the MANIFEST file.
* Add test case for new encoding problemsLucas Hoffmann2018-12-24
|
* update tagstring tests for regex behaviorWill Dietz2018-12-22
| | | | | | * Fix (invert) existing test * Add new tests based on behavior mentioned previously * test to ensure translations using re.sub work
* tests: Require python3 in test_env_setJordan Justen2018-12-19
| | | | | Fixes: https://github.com/pazz/alot/issues/1354 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* rename get_account_by_address to account_matching_addressvrs2018-12-10
| | | | | ... since accounts' addresses can overlap and get_account_by_address promises too much. Also remove now-obsolete get_addresses.
* match addresses against accounts, not address listsvrs2018-12-10
| | | | fixes #1230, fixes an unfiled bug in clear_my_address()
* attach accounts to envelopesvrs2018-12-10
| | | | simplifies a few tests, fixes #1177
* refactor test_issue_1291Patrick Totzke2018-12-07
| | | | | | this is now test_char_vs_cte_mismatch; It checks if a mime part contains a character which is not encoded in the encoding declared in the Content-Transfer-Encoding header
* add test test_unknown_cte_valuePatrick Totzke2018-12-07
| | | | | that tests if a message with unknown content-transfer-encoding header, but otherwise correct ascii encoded payload, is warned about.
* tests: update test_malformed_cte_valuePatrick Totzke2018-12-07
| | | | | It now tests if malformed Content-Transfer-Encoding values are reported in the logs
* pep8 fixesPatrick Totzke2018-12-03
|
* Add test for #1301Lucas Hoffmann2018-12-03
| | | | | | This adds a test for detecting a malformed content-transfer-encoding (trailing semi-colon). It also changes the raised exception to the more appropriate ValueError.
* Add simple test to demonstrate #1291Lucas Hoffmann2018-12-03
| | | | This does just call the final bit of code that throws the exception.
* Add two messages to the test mail corpusLucas Hoffmann2018-12-03
| | | | | The test corpus holds mails that are used to test different problems with parsing or displaying mail.
* Assert some logging messages to silence themLucas Hoffmann2018-11-11
| | | | | The logging messages appear in between the test output. By asserting them they are hidden from the output.
* Fix deprecation warnings for unittestsLucas Hoffmann2018-11-11
|
* Merge pull request #1306 from lucc/fix-1303Dylan Baker2018-10-10
|\ | | | | Check the return code from sendmail
| * Check the return code from sendmailLucas Hoffmann2018-09-22
| |
* | crypto: Use session-key to decrypt messages if present in the indexRuben Pollan2018-10-08
|/ | | | | | | | | | notmuch caches the OpenPGP session keys if configured to do so. See index.decrypt on: https://notmuchmail.org/manpages/notmuch-config-1/ Using the cached session key decryption of messages can be done without the need of having the private OpenPGP key. There is some speed up on decryption, mostly notable on long encrypted threads.
* Add a simple test for the send_mail functionLucas Hoffmann2018-08-16
| | | | | This is just a simple test for the bug reported in #1303. The interesting test is marked as a known failure.
* db/utils: Replace encode_header with Message.add_headerDylan Baker2018-08-04
| | | | | Which appears to be capable of doing all the same things, but is in the stdlib instead of something we hand rolled.
* db: encode Header objects to strDylan Baker2018-08-04
| | | | | | | | | | | In python 3 with the use of Policy objects (other than the Compat32 object which maintains the previous (python 2.x and <=3.2) API) change the way headers work, and the old Header object is no longer used. This is rather convenient in that python now implements many of the rules required for sepcial header types, but it changes the API. This fixes that by encoding the Header objects to strings. Fixes #1289
* tests/db/envelope: Add tests for construct_mailDylan Baker2018-08-04
|
* commands/globals: Convert CallCommand.apply to a coroutineDylan Baker2018-08-02
| | | | | | This allows it to easily wrap calls that are themselves coroutines, while it's still able to wrap synchronous calls. This fixes the async test and allows hooks that are coroutines to work.
* tests: Add a couple of tests for the CallCommand classDylan Baker2018-08-02
| | | | | This basically just tests that a synchronous and an asynchronous function work, (the async doesn't yet).
* helper: replace email_as_* with email builtinsDylan Baker2018-08-02
| | | | | | | | | | | | | | Python 3.3 added a new feature to the email module, policies (https://docs.python.org/3.5/library/email.policy.html). Policy objects allow precise control over how numerous features work when converting to and from str or bytes. With the `email.policy.SMTP` the behavior of email_as_bytes and email_as_string can be achieved using the builtin `.as_string()` and `.as_bytes()` methods, without custom code or the need to test it. Additionally these methods handle corner cases that we don't currently handle, such as multi-part messages with different encodings. Fixes #1257
* tests: use "gpg2" instead of "gpg" commandDylan Baker2018-08-01
| | | | | | | | | Some distro (notably debian and derived distros like ubuntu) still package the obsolete gpg 1.x series as "gpg", and provide the modern gpg 2.x tool as "gpg2". Other distros don't package gpg 1.x anymore, but most seem to provide a gpg2 symlink, so this should be safe for them. This is verified working on Archlinux, and is required to make these two tests work on Ubuntu 16.04 Xenial.
* 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
|