]> git.decadent.org.uk Git - dak.git/commitdiff
tests/test_parse_changes.py: Test that an contentless .dsc fails correctly
authorChris Lamb <lamby@debian.org>
Mon, 24 Aug 2015 13:25:52 +0000 (15:25 +0200)
committerChris Lamb <lamby@debian.org>
Mon, 24 Aug 2015 14:19:47 +0000 (16:19 +0200)
tests/fixtures/dsc/8.dsc [new file with mode: 0644]
tests/test_parse_changes.py

diff --git a/tests/fixtures/dsc/8.dsc b/tests/fixtures/dsc/8.dsc
new file mode 100644 (file)
index 0000000..92f3c52
--- /dev/null
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.0.2 (GNU/Linux)
+Comment: For info see http://www.gnupg.org
+
+iD8DBQE5j091iPgEjVqvb1kRAvFtAJ0asUAaac6ebfR3YeaH16HjL7F3GwCfV+AQ
+rhYnRmVuNMa8oYSvL4hl/Yw=
+=EFAA
+-----END PGP SIGNATURE-----
index 5f6d49ab38605b5c2cf2662eb6f9e2efd191067e..ff483743d7350fff2cec6b5dc1e0d7508fef4a8f 100755 (executable)
@@ -50,6 +50,11 @@ class ParseDscTestCase(ParseChangesTestCase):
         with self.assertRaises(GpgException):
             self.assertParse('dsc/7.dsc', -1, 1)
 
+    def test_8(self):
+        # No armored contents
+        with self.assertRaisesRegexp(ParseChangesError, "Empty changes"):
+            self.assertParse('dsc/8.dsc', -1, 1)
+
 class ParseChangesTestCase(ParseChangesTestCase):
     def test_1(self):
         # Empty changes