From: Chris Lamb Date: Mon, 24 Aug 2015 13:25:52 +0000 (+0200) Subject: tests/test_parse_changes.py: Test that an contentless .dsc fails correctly X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=09a0b92396ac9b32ef2bf816614821d46f2da82b;p=dak.git tests/test_parse_changes.py: Test that an contentless .dsc fails correctly --- diff --git a/tests/fixtures/dsc/8.dsc b/tests/fixtures/dsc/8.dsc new file mode 100644 index 00000000..92f3c523 --- /dev/null +++ b/tests/fixtures/dsc/8.dsc @@ -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----- diff --git a/tests/test_parse_changes.py b/tests/test_parse_changes.py index 5f6d49ab..ff483743 100755 --- a/tests/test_parse_changes.py +++ b/tests/test_parse_changes.py @@ -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