From: Ansgar Burchardt Date: Tue, 2 Sep 2014 23:29:30 +0000 (+0200) Subject: test_gpg.py: test PGP messages and plaintext X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=9dbb7b6ec34adb6a28180279895c888806f6e9de;p=dak.git test_gpg.py: test PGP messages and plaintext --- diff --git a/tests/fixtures/gpg/message.asc b/tests/fixtures/gpg/message.asc new file mode 100644 index 00000000..5962eba0 --- /dev/null +++ b/tests/fixtures/gpg/message.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP MESSAGE----- +Version: GnuPG v1 + +owE7LZXEEMIWKBWWmJOZYqWQl69bnJmel1hSWpTKBQA= +=JwM5 +-----END PGP MESSAGE----- diff --git a/tests/fixtures/gpg/plaintext.txt b/tests/fixtures/gpg/plaintext.txt new file mode 100644 index 00000000..c3e7f82c --- /dev/null +++ b/tests/fixtures/gpg/plaintext.txt @@ -0,0 +1 @@ +Valid: text/plain diff --git a/tests/test_gpg.py b/tests/test_gpg.py index 445eb460..7c051968 100755 --- a/tests/test_gpg.py +++ b/tests/test_gpg.py @@ -61,5 +61,13 @@ class GpgTest(DakTestCase): with self.assertRaises(GpgException): verify('gpg/expired-subkey.asc') + def test_message_assertion(self): + with self.assertRaises(GpgException): + verify('gpg/message.asc') + + def test_plain_assertion(self): + with self.assertRaises(GpgException): + verify('gpg/plaintext.txt') + if __name__ == '__main__': unittest.main()