| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
email.utils.formataddr does more encoding than we need at this point -
headers will be encoded when they get inserted anyway.
Use db.utils.formataddr instead. Fixes #1378
Note that some tests need to be (and are) changed: The expectation of
the old tests was to get a completely escaped result.
Also, add an umlaut test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The keys were expired and thus the tests were failing. In order to
remove the expiration time the following actions were taken:
Creating a temporary directory to use as GNUPGHOME, importing all the
keys:
mkdir tmp
export GNUPGHOME=$PWD/tmp
gpg --import tests/static/gpg-keys/*sec.gpg
For each of the three keys the expiration time was set to unlimited and
they were reexported (the ones that were not ascii armored before were
again exported without the `--armor` option):
gpg --edit-key $KEY_ID
gpg --export --armor $KEY_ID > $PUB_FILE
gpg --export-secret-keys --armor $KEY_ID > $SEC_FILE
Finally:
rm -rf $GNUPGHOME
unset GNUPGHOME
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
ComposeCommand._set_gpg_sign will now read off the account from
self.envelope and not separate parameters.
|
|
|
|
| |
.. which was replaced earlier
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
* Fix (invert) existing test
* Add new tests based on behavior mentioned previously
* test to ensure translations using re.sub work
|
|
|
|
|
| |
Fixes: https://github.com/pazz/alot/issues/1354
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
|
|
|
| |
... since accounts' addresses can overlap and get_account_by_address
promises too much. Also remove now-obsolete get_addresses.
|
|
|
|
| |
fixes #1230, fixes an unfiled bug in clear_my_address()
|
|
|
|
| |
simplifies a few tests, fixes #1177
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
that tests if a message with unknown content-transfer-encoding header,
but otherwise correct ascii encoded payload, is warned about.
|
|
|
|
|
| |
It now tests if malformed Content-Transfer-Encoding values are reported
in the logs
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This does just call the final bit of code that throws the exception.
|
|
|
|
|
| |
The test corpus holds mails that are used to test different problems
with parsing or displaying mail.
|
|
|
|
|
| |
The logging messages appear in between the test output. By asserting
them they are hidden from the output.
|
| |
|
|\
| |
| | |
Check the return code from sendmail
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is just a simple test for the bug reported in #1303. The
interesting test is marked as a known failure.
|
|
|
|
|
| |
Which appears to be capable of doing all the same things, but is in the
stdlib instead of something we hand rolled.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This basically just tests that a synchronous and an asynchronous
function work, (the async doesn't yet).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
all unittests now use asyncio and the standard unittest framework.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|