aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/model/tests/test_list.py
diff options
context:
space:
mode:
authorJ08nY2017-08-10 18:32:22 +0200
committerJ08nY2017-08-10 18:32:22 +0200
commita973479205cec0d5fbf162030906ce405b3698b2 (patch)
treea4b84cdc6988ab953ba6f99dae9f920d3522c39f /src/mailman_pgp/model/tests/test_list.py
parent5fc418fe1be80e1fe8170919c0caf1dae63d4275 (diff)
downloadmailman-pgp-a973479205cec0d5fbf162030906ce405b3698b2.tar.gz
mailman-pgp-a973479205cec0d5fbf162030906ce405b3698b2.tar.zst
mailman-pgp-a973479205cec0d5fbf162030906ce405b3698b2.zip
Diffstat (limited to 'src/mailman_pgp/model/tests/test_list.py')
-rw-r--r--src/mailman_pgp/model/tests/test_list.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mailman_pgp/model/tests/test_list.py b/src/mailman_pgp/model/tests/test_list.py
index aa07a79..9bb0a4e 100644
--- a/src/mailman_pgp/model/tests/test_list.py
+++ b/src/mailman_pgp/model/tests/test_list.py
@@ -50,6 +50,17 @@ class TestPGPMailingList(TestCase):
getUtility(IListManager).delete(self.mlist)
self.assertFalse(exists(key_path))
+ def test_shred_key_command(self):
+ self.addCleanup(config.set, 'keypairs', 'shred_command', '')
+ config.set('keypairs', 'shred_command', 'shred')
+ key_path = PGPMailingList.for_list(self.mlist).key_path
+ with open(key_path, 'rb') as f:
+ before = f.read()
+ getUtility(IListManager).delete(self.mlist)
+ with open(key_path, 'rb') as f:
+ after = f.read()
+ self.assertNotEqual(before, after)
+
def test_delete_key(self):
self.addCleanup(config.set, 'keypairs', 'shred', 'yes')
config.set('keypairs', 'shred', 'no')