From 09a0b92396ac9b32ef2bf816614821d46f2da82b Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Mon, 24 Aug 2015 15:25:52 +0200 Subject: [PATCH] tests/test_parse_changes.py: Test that an contentless .dsc fails correctly --- tests/fixtures/dsc/8.dsc | 11 +++++++++++ tests/test_parse_changes.py | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 tests/fixtures/dsc/8.dsc 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 -- 2.39.5