Commit Graph

34 Commits (8c6821ea0ea085e93c9dc3fbd11e6e45c126ac6c)

Author SHA1 Message Date
Isis Lovecruft a97040a06f
Add unittest cmdline argparse to hook into unittest.TestProgram's parser. 2013-04-10 17:19:25 +00:00
Isis Lovecruft 20284e0741
Revise logger and suite ordering, and override parts of unittest module.
* Rearrange sets of testsuites to provide logical execution order.
 * Remove unused suite() function.
 * Create dynamic module loader through a unittest.TestProgram.createTest
   override to take an instance of unittest.TestLoader which is created later.
2013-04-10 17:14:06 +00:00
Isis Lovecruft 43a69e9fcd
Update test assertions for key generation and batch parameters after import.
* In unittest test_key_generation_import_list_with_colons().
2013-04-10 17:08:21 +00:00
Isis Lovecruft c19fd30545
Add assertions to check that key have been created in test_gen_key_*(). 2013-04-10 17:05:35 +00:00
Isis Lovecruft f0ee442bab
Pep8ify some more docstrings. 2013-04-10 17:04:57 +00:00
Isis Lovecruft 1d34b04d82
Remove unused function expire_today(). 2013-04-10 17:03:21 +00:00
Isis Lovecruft b758239af8
Add implementation note on test_copy_data(). 2013-04-10 17:02:13 +00:00
Isis Lovecruft 5f157c3c00
Don't hardcode paths. 2013-04-10 17:01:37 +00:00
Isis Lovecruft fc71ede502
Cleanup assertion statement. 2013-04-10 17:00:52 +00:00
Isis Lovecruft 5e706d09d0
Pep8 the docstrings. 2013-04-10 17:00:11 +00:00
Isis Lovecruft 5cd2eb2b94
Also get the logger from gnupg so that we can debug events in unittests. 2013-04-10 16:58:59 +00:00
Isis Lovecruft c72aa1eb96
Update unittest temporary file directory location and gnupghome. 2013-04-10 16:55:29 +00:00
Isis Lovecruft c5d2e6fc9d
Keep module metadata in one place. 2013-04-10 16:54:39 +00:00
Isis Lovecruft 4ee62ea400
Patch Python2.6 and earlier to use future-patched unittest module. 2013-04-10 16:52:48 +00:00
Isis Lovecruft 1cac3df2ca
Add the missing crunchbang in test_gnupg.py. 2013-04-10 16:43:42 +00:00
Isis Lovecruft e9d223f701
Fix typos, remove extra whitespace line. 2013-04-09 17:47:31 +00:00
Isis Lovecruft 09481d27ae
Split key material related unittests into separate test suites by functionality. 2013-04-09 17:34:18 +00:00
Isis Lovecruft 24881a2e9e
Add better unittests for gnupg.GPG.gen_key() and gen_key_input().
* Add unittest suite for genkey tests.
2013-04-09 17:32:09 +00:00
Isis Lovecruft 9cbc508a9b
Add test for gnupg._copy_data().
* Also, fixed a couple more quotes in docstrings, as well as some whitespace
   formatting issues.
2013-04-05 21:30:55 +00:00
Isis Lovecruft 1e4fa9e2f4
Refactor old docstrings to have PEP8 conformant three double quotes. 2013-04-05 21:27:21 +00:00
Isis Lovecruft 37380ff05f
Change debugging messages for key import tests to be more precise.
* Also, disabled doctest runs when called with "$ python test_gnupg.py".
2013-04-02 13:15:37 +00:00
Isis Lovecruft b86d11296b
Clean up a few import statements. 2013-04-02 13:14:53 +00:00
Isis Lovecruft 980bff85cc
Fix a bug where the unittests were leaving hanging file descriptors.
* The old unittests did not clean up temp files properly in some test cases.
2013-04-02 13:11:43 +00:00
Isis Lovecruft 5b38b64c97
Rewrote more unittests. All basic tests now pass. 2013-03-19 07:18:56 +00:00
Isis Lovecruft be303125d1 Fix test_gpg_binary_version_str() to detect correct output from 'gpg --version'. 2013-03-18 19:36:30 +00:00
Isis Lovecruft 0b6b4ed2ff Add new unittests and remove now irrelevant old ones. 2013-03-18 19:36:30 +00:00
Isis Lovecruft ca880901eb Fix keyring location names in test_gnupg.py. 2013-03-18 19:36:30 +00:00
Isis Lovecruft 34bbf47e60 Add io.StringIO subclass for writing gpg process results to a string.
* These .write()s need to be forced to unicode for StringIO to handle them
   correctly.
2013-03-18 19:36:30 +00:00
Isis Lovecruft 311ee4b83b Add unittest for discovery of keyring files. 2013-03-18 19:36:30 +00:00
Isis Lovecruft d8264a619b Update test_gnupg.py unittests to reflect changes in the code. 2013-03-18 19:36:30 +00:00
Isis Lovecruft 0c5e8f9110 Update test_gnupy.py to use the same standard key generation params.
* Test method now matches the batch key generation parameters in gnupg.py.
 * Fix trailing whitespace in test_gnupg.py.
2013-03-18 19:36:29 +00:00
Isis Lovecruft 2720b68b8c Update test_gnupg.py logger settings.
* The logfile is now appended to, rather than rewritten, so that we can
   still see past test results.
2013-03-18 19:36:29 +00:00
Isis Lovecruft e0f0023c81 Update test_gnupg.py with update parameter names. 2013-03-18 19:36:29 +00:00
Isis Lovecruft 69b7f86529 Original source from code.google.com, version 0.3.2. 2013-02-13 21:19:18 +00:00