gpg-lacre/test
Piotr F. Mieszkowski b6bd36a460 Use bytes instead of str to hold message bodies
smtplib.SMTP expects ASCII-only message bodies when message body is provided
as a 'str'.  If we pass a 'bytes', we need to choose encoding earlier and we
do this by calling 'as_bytes' on messages with SMTP policy, which takes care
of formatting the body properly.

As a result, ISO-8859-x messages are converted to Quoted Printable and UTF-8
messages are Base64-encoded.

Testing this behaviour is tricky, because we use the same SMTP client to send
test data.  For this reason, test code has become a bit ugly, but it does
exactly what we need.
2023-05-08 22:14:24 +02:00
..
certs Keep test/certs directory 2022-01-07 12:03:38 +01:00
keyhome Add E2E case: a user with a key and PGP/MIME configured 2022-05-30 00:49:40 +02:00
keys Add basic unit tests for GnuPG module 2022-12-14 21:09:46 +01:00
modules Add missing test case for `add_key` and `delete_key` 2022-12-23 13:49:43 +01:00
msgin Add UTF-8 and ISO-8859-2 test cases, make tests more reliable 2023-05-08 22:14:24 +02:00
utils Use bytes instead of str to hold message bodies 2023-05-08 22:14:24 +02:00
daemon_test.py Add a test for message with PGP inline markers that's not encrypted 2022-10-22 21:29:59 +02:00
e2e.ini Use bytes instead of str to hold message bodies 2023-05-08 22:14:24 +02:00
e2e_test.py Add UTF-8 and ISO-8859-2 test cases, make tests more reliable 2023-05-08 22:14:24 +02:00
gpg-lacre-log.ini Improve logging 2022-10-20 21:56:01 +02:00
gpg-mailgate-cron-test.conf Finish migration to SQLAlchemy and automate testing cron.py 2022-04-23 13:08:40 +02:00
gpg-mailgate-daemon-test.conf Add cache validity configuration parameter 2022-10-19 18:36:23 +00:00
sample.ini Add more contract tests 2022-05-25 22:13:40 +02:00