Handle text data carefully #82

Merged
pfm merged 7 commits from 75-unify-types into master 2022-06-01 23:59:53 +02:00
Collaborator

In Python 3.x there are two main in-memory representations of textual data: str and bytes.

  1. Add "contract tests" documenting types consumed and produced by APIs we use.
  2. Move some of the text-processing functionality to lacre.text package.
In Python 3.x there are two main in-memory representations of textual data: `str` and `bytes`. 1. Add "contract tests" documenting types consumed and produced by APIs we use. 2. Move some of the text-processing functionality to lacre.text package.
pfm added this to the Test deployment findings milestone 2022-06-01 23:08:43 +02:00
pfm added the
CODE
TESTS
labels 2022-06-01 23:08:43 +02:00
pfm added 5 commits 2022-06-01 23:08:44 +02:00
558872d9d0 Start documenting dependency contracts with unit tests
Implement some unit tests for 'email' package so we know precisely how this
package behaves.
707fc96234
Add more contract tests
- Verify that Message.get_payload() returns str, unless passed decode=True,
when it returns bytes.

- Verify that RawConfigParser returns str.
3bcc1151e5 Add E2E case: a user with a key and PGP/MIME configured
- Add a new test input message for a new test identity, test scenario
  configuration and a test key.

- While retrieving message payload, determine charset based on the
  Content-Type header.  When missing, default to UTF-8.

- Use more comprehensible variables names.

- Adjust logging levels.
4c6fdc52ec Check mandatory config early, add tests
Also: extend failover logging configuration with file-based handler to make
sure that the user gets _some_ logs even if they do not configure Lacre at
all.
pfm added 1 commit 2022-06-01 23:25:02 +02:00
pfm added 1 commit 2022-06-01 23:45:21 +02:00
pfm merged commit 9820e42457 into master 2022-06-01 23:59:53 +02:00
pfm deleted branch 75-unify-types 2022-06-01 23:59:54 +02:00
Sign in to join this conversation.
No description provided.