Commit Graph

32 Commits (fa57bc61581b193f2b264dc1274ece3d3810b976)

Author SHA1 Message Date
Isis Lovecruft fa57bc6158
Change unittest for symmetric encryption to include correct boolean options. 2013-05-27 09:30:05 +00:00
Isis Lovecruft 690b0efc76
Rewrite unittest for encryption/decryption to multi recipients. 2013-05-27 09:28:18 +00:00
Isis Lovecruft c1fb532c53
Change unittest, recipients doesn't need to be list, and data should be string. 2013-05-27 09:25:34 +00:00
Isis Lovecruft 622544ef13
Rewrite test_encryption_multi_recipient to also test separate keyrings option. 2013-05-27 09:23:32 +00:00
Isis Lovecruft 348c5b59fb
If setting Key-Length, also set Subkey-Length, else GnuPG defaults to 1024. 2013-05-27 09:20:51 +00:00
Isis Lovecruft 70ceb50744
Fix a unittest so that the data returned is a human readable string. 2013-05-27 09:18:13 +00:00
Isis Lovecruft c4ab6bd5d6
Change unittest, recipients don't need to be lists/tuples. 2013-05-27 09:17:27 +00:00
Isis Lovecruft 2c577466c3
Add two helpful debug statements, remove two superfluous asserts from unittest. 2013-05-27 09:14:38 +00:00
Isis Lovecruft a9ea5a1e48
Change unittest because recipients don't needs to be lists/tuples anymore. 2013-05-27 09:13:55 +00:00
Isis Lovecruft dad755ec3a
Awkwardly, fingerprints need to always be strings. Change unittests to do so. 2013-05-27 09:13:04 +00:00
Isis Lovecruft 611184f242
Add '--no-options' to unittest on _make_options() output. 2013-05-27 09:09:32 +00:00
Isis Lovecruft de36fe52d1
Change varable name keyid→default_key. 2013-05-27 08:20:27 +00:00
Isis Lovecruft 10014d5401
Rewrite multi-recipient encryption test 2013-05-22 17:25:57 +00:00
Isis Lovecruft 345ca75e85
Minor fixes to encryption with iso-8859-1 encodings test. 2013-05-22 17:25:21 +00:00
Isis Lovecruft ba37ce083d
Explicitly set the passphrase on one of the unittest keys. 2013-05-22 17:23:18 +00:00
Isis Lovecruft 3780a6bed2
More whitespace/style fixes. 2013-05-22 17:22:30 +00:00
Isis Lovecruft fba19da0a0
Use the setting in GPGTestCase.__init__() for insecure PRNG. 2013-05-22 17:20:55 +00:00
Isis Lovecruft 8cdc85aa0e
Add some point the order of these two args was switch, so test should match. 2013-05-22 17:18:58 +00:00
Isis Lovecruft e563faa344
Add print() in unittest for the binary location to be sure PATH hack works. 2013-05-22 17:17:02 +00:00
Isis Lovecruft c577fdcfe5
Add unittests for codec translator utilities. 2013-05-22 17:12:27 +00:00
Isis Lovecruft 60d6f676e5
util→_util & parsers→_parsers 2013-05-22 17:01:36 +00:00
Isis Lovecruft 18f0e97134
Remove extra whitespace 2013-05-22 16:58:47 +00:00
Isis Lovecruft e6538d6ca3
Change keyring/secring attrs to be based on settings in tests 2013-05-22 16:57:41 +00:00
Isis Lovecruft 2d19b7d771
Add a way to save generated test keys for later debugging 2013-05-22 16:54:56 +00:00
Isis Lovecruft 9b6f823a6e
Whitespace fixes 2013-05-22 16:53:18 +00:00
Isis Lovecruft a3ac1efb94
Use the log object from _util in test handler. 2013-05-22 16:52:35 +00:00
Isis Lovecruft c36687f45a
util→_util & parsers→_parsers 2013-05-22 16:51:33 +00:00
Isis Lovecruft ac8ef6c721
Add codecs and encodings to test handler so that open() uses them 2013-05-22 16:49:40 +00:00
Isis Lovecruft 5059b2c7b2
Move import statement 2013-05-22 16:48:14 +00:00
Isis Lovecruft 891ee9e7eb
Significantly improve logging facilities for faster debugging.
* Include _ansistrm.py, which was released under new BSD license separately in
   a github gist as well as in the Python logutils module. Instead of setting
   up a src/includes/ directory, I have included this file in the currently
   flat module directory, because dealing with submodule imports in Python2.x
   is a pain. I'm not sure if this will cause problems for Debian packaging,
   but it could be changed later if so. The full text of the original license
   and copyright has been retained at the head of _ansistrm.py, clearly
   demarcated from python-gnupg's license and copyright info. The author of
   _ansistrm.py is the same as the current upstream maintainer for
   python-gnupg, Vinay Sajip, and I don't see why this person doesn't include
   _ansistrm.py in all of their packages, because it is making skimming the
   test logs for errors much faster.

 * Add _logger.py, which contains a class decorator:

       @wraps(logging.Logger)
       def create_logger(level=logging.NOTSET)
       [...]

   which autoconfigures logging functionality. By default, logging.NullHandler
   is still used, so there are no logs (neither logfiles nor piped to
   stdout). If _logger.create_logger() is called with either a LEVEL attribute
   from the logging module, or the integer equivalent, it will initialise
   logging to stdout only. In the unittest suite, extra log handling
   functionality is added to also write to a datetime-stamped logfile in the
   tests/ directory.

 * Change all "logger.<level>" statements to "log.<level>" and add new ones for
   debugging and user information purposes.

 * Remove the import of the python standard utilities logging module from:
       src/gnupg.py
       src/parsers.py
       src/util.py

   and switch to setting a top-level attribute, util.log, which is the returned
   class from _logger.create_logger(). Everything else now does "from util
   import log".
2013-05-17 02:15:17 +00:00
Isis Lovecruft 1588822f02
Fix accidental misnaming from sed 's/pubring/keyring/'. 2013-05-13 09:14:42 +00:00
Isis Lovecruft c97b51fec5
Add versioneer and restructure the repo into a src/ dir. 2013-05-12 09:32:46 +00:00