summaryrefslogtreecommitdiff
path: root/tests/crypto_test.py
Commit message (Collapse)AuthorAge
* tests: move shared helpers out of crypto module into common moduleDylan Baker2017-07-24
|
* tests/crypto: Add tests for the crypto moduleDylan Baker2017-07-15
| | | | | | This covers mosts of the functions in the crypto module, but doesn't bother with the hash_key function, which is slated for deletion in the port to python-gpg. It also doesn't cover re-raising errors.
* crypto: Fix error handling of signed messagesDylan Baker2017-07-11
| | | | | | | | | | gpgme.Context.verify doesn't raise an exception, instead it attaches the error as an attribute of the return value. This means that we've been returning that a signature is valid even when it isn't. This patch checks the attribute instead of try/excepting. Because there is a second bug (fixed in the next patch) signature verification will always fail with this patch.
* tests: Add tests for signing functions.Dylan Baker2017-07-11
| | | | | | | | This adds a couple of basic tests for the signing and verification of signatures code in the crypto module. This relies on the utilities module introduced in the last patch. One of the tests in here is expected to fail
* Add crypto tests that don't need a keyringLucas Hoffmann2017-06-21