]> git.decadent.org.uk Git - dak.git/blobdiff - tests/test_parse_changes.py
tests/test_parse_changes.py: Test that an contentless .dsc fails correctly
[dak.git] / tests / test_parse_changes.py
index 2a66f832a12cb867db0c43543d2832f13beae60e..ff483743d7350fff2cec6b5dc1e0d7508fef4a8f 100755 (executable)
@@ -45,6 +45,16 @@ class ParseDscTestCase(ParseChangesTestCase):
         # Extra blank line after signature header
         self.assertParse('dsc/6.dsc', -1, 1)
 
+    def test_7(self):
+        # Blank file is an invalid armored GPG file
+        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