| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This decorator works to allow tests for pure asyncio coroutines to
operate synchronously.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This adds a new TestCase for the database manager
and adds a test for saving/reading named query strings to the database.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
fix: automatically update envelope gpg keys only if requested. see #1228
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Message from bytes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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).
|
|/ /
| |
| |
| | |
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
|/
|
|
|
|
|
| |
- 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)
|
|
|
|
| |
They are not needed for python >= 3.0.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
This allows writing less-nested statements.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|