]> git.decadent.org.uk Git - dak.git/commitdiff
test_gpg.py: test PGP messages and plaintext
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 2 Sep 2014 23:29:30 +0000 (01:29 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 2 Sep 2014 23:30:15 +0000 (01:30 +0200)
tests/fixtures/gpg/message.asc [new file with mode: 0644]
tests/fixtures/gpg/plaintext.txt [new file with mode: 0644]
tests/test_gpg.py

diff --git a/tests/fixtures/gpg/message.asc b/tests/fixtures/gpg/message.asc
new file mode 100644 (file)
index 0000000..5962eba
--- /dev/null
@@ -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 (file)
index 0000000..c3e7f82
--- /dev/null
@@ -0,0 +1 @@
+Valid: text/plain
index 445eb460fbb5aa5b47e8bdbf8b0b8436e76d50f8..7c0519688ef61dcb2cd4a4f2c84bf8321d1f6d41 100755 (executable)
@@ -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()