]> err.no Git - dak/commitdiff
tests/test_parse_changes.py: do not require signatures
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 20 May 2011 20:09:33 +0000 (20:09 +0000)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 20 May 2011 20:09:33 +0000 (20:09 +0000)
We cannot require a valid signature in the tests as we don't have a
keyring here.

Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
tests/test_parse_changes.py

index 38f653d006256bc612c9d86b7d0a3e3eaaae35b2..be68adce79999287622f4486e298a4408af94225 100755 (executable)
@@ -26,43 +26,43 @@ class ParseChangesTestCase(DakTestCase):
 
 class ParseDscTestCase(ParseChangesTestCase):
     def test_1(self):
-        self.assertParse('dsc/1.dsc', 0, 1)
+        self.assertParse('dsc/1.dsc', -1, 1)
 
     def test_1_ignoreErrors(self):
         # Valid .dsc ; ignoring errors
-        self.assertParse('dsc/1.dsc', 0, 1)
+        self.assertParse('dsc/1.dsc', -1, 1)
 
     def test_2(self):
         # Missing blank line before signature body
-        self.assertParse('dsc/2.dsc', 0, 1)
+        self.assertParse('dsc/2.dsc', -1, 1)
 
     def test_2_ignoreErrors(self):
         # Invalid .dsc ; ignoring errors
-        self.assertParse('dsc/2.dsc', 0, 1)
+        self.assertParse('dsc/2.dsc', -1, 1)
 
     def test_3(self):
         # Missing blank line after signature header
-        self.assertParse('dsc/3.dsc', 0, 1)
+        self.assertParse('dsc/3.dsc', -1, 1)
 
     def test_4(self):
         # No blank lines at all
-        self.assertFails('dsc/4.dsc', 0, 1)
+        self.assertFails('dsc/4.dsc', -1, 1)
 
     def test_5(self):
         # Extra blank line before signature body
-        self.assertParse('dsc/5.dsc', 0, 1)
+        self.assertParse('dsc/5.dsc', -1, 1)
 
     def test_6(self):
         # Extra blank line after signature header
-        self.assertParse('dsc/6.dsc', 0, 1)
+        self.assertParse('dsc/6.dsc', -1, 1)
 
 class ParseChangesTestCase(ParseChangesTestCase):
     def test_1(self):
         # Empty changes
-        self.assertFails('changes/1.changes', line=5)
+        self.assertFails('changes/1.changes', 5, -1)
 
     def test_2(self):
-        changes = self.assertParse('changes/2.changes', 0)
+        changes = self.assertParse('changes/2.changes', -1)
 
         binaries = changes['binary']
 
@@ -70,7 +70,7 @@ class ParseChangesTestCase(ParseChangesTestCase):
 
     def test_3(self):
         for filename in ('valid', 'bogus-pre', 'bogus-post'):
-            for strict_whitespace in (0, 1):
+            for strict_whitespace in (-1,):
                 changes = self.assertParse(
                     'changes/%s.changes' % filename,
                     strict_whitespace,