[Pkg-python-debian-commits] r57 /bzr/pkg-python-debian/trunk: Test that the empty author line is not allowed without allow_empty_author

James Westby jw+debian at jameswestby.net
Sun Jul 8 18:54:21 UTC 2007


------------------------------------------------------------
revno: 57
committer: James Westby <jw+debian at jameswestby.net>
branch nick: trunk
timestamp: Sun 2007-07-08 19:54:21 +0100
message:
  Test that the empty author line is not allowed without allow_empty_author
modified:
  debian_bundle/changelog.py
-------------- next part --------------
=== modified file 'debian_bundle/changelog.py'
--- a/debian_bundle/changelog.py	2007-07-08 18:18:10 +0000
+++ b/debian_bundle/changelog.py	2007-07-08 18:54:21 +0000
@@ -443,15 +443,19 @@
                       c2.debian_version))
 
   def test_changelog_no_author(self):
-    c1 = Changelog("""gnutls13 (1:1.4.1-1) unstable; urgency=low
+    cl_no_author = """gnutls13 (1:1.4.1-1) unstable; urgency=low
 
   * New upstream release.
 
  --
-""", allow_empty_author=True)
+"""
+    c1 = Changelog()
+    c1.parse_changelog(cl_no_author, allow_empty_author=True)
     self.assertEqual(c1.author, None)
     self.assertEqual(c1.date, None)
     self.assertEqual(c1.package, "gnutls13")
+    c2 = Changelog()
+    self.assertRaises(ChangelogParseError, c2.parse_changelog, cl_no_author)
 
   def test_magic_version_properties(self):
     c = Changelog(open('test_changelog').read())



More information about the pkg-python-debian-commits mailing list