[Zope3-checkins] CVS: Products3/z3checkins/tests -
test_message.py:1.15
Marius Gedminas
marius at pov.lt
Wed Oct 15 15:42:55 EDT 2003
Update of /cvs-repository/Products3/z3checkins/tests
In directory cvs.zope.org:/tmp/cvs-serv6669/tests
Modified Files:
test_message.py
Log Message:
Handle wrapped subject lines.
Note that z3checkins is lagging behind Zope 3 HEAD. The reason for this
is the usual lack of time and the fact, that the only known installation
(http://checkins.schooltool.org/) is still running a bit older Zope 3
snapshot.
=== Products3/z3checkins/tests/test_message.py 1.14 => 1.15 ===
--- Products3/z3checkins/tests/test_message.py:1.14 Wed Sep 17 10:25:17 2003
+++ Products3/z3checkins/tests/test_message.py Wed Oct 15 15:42:54 2003
@@ -242,6 +242,46 @@
http://lists.schooltool.org/mailman/listinfo/checkins
"""
+ svn_msg_with_split_subject = """\
+To: checkins at lists.schooltool.org
+From: Albertas Agejevas <alga at pov.lt>
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Message-Id: <20030908101551.6F900C32F at mail.pov.lt>
+Date: Mon, 8 Sep 2003 13:15:51 +0300 (EEST)
+Subject: [schooltool-checkins] rev 10 -
+\ttrunk/schooltool
+
+Author: alga
+Date: 2003-09-08 13:15:50 +0300 (Mon, 08 Sep 2003)
+New Revision: 10
+
+Modified:
+ trunk/schooltool/README
+Log:
+Added a period.
+
+
+Modified: trunk/schooltool/README
+===================================================================
+--- trunk/schooltool/README 2003-09-05 16:54:07 UTC (rev 9)
++++ trunk/schooltool/README 2003-09-08 10:15:50 UTC (rev 10)
+@@ -1,7 +1,7 @@
+ SchoolTool
+ ==========
+
+-SchoolTool - common information systems platform for school administration
++SchoolTool - common information systems platform for school administration.
+
+ Website: http://www.schooltool.org/
+
+
+_______________________________________________
+Checkins mailing list
+Checkins at lists.schooltool.org
+http://lists.schooltool.org/mailman/listinfo/checkins
+"""
+
def test_interface(self):
from zopeproducts.z3checkins.message import CheckinMessageParser
@@ -327,6 +367,24 @@
from zopeproducts.z3checkins.message import FixedTimezone
parser = CheckinMessageParser()
msg = parser.parse(StringIO(self.svn_msg))
+ #self.assert_(ICheckinMessage.isImplementedBy(msg))
+ self.assertEquals(msg.message_id, "<20030908101551.6F900C32F at mail.pov.lt>")
+ self.assertEquals(msg.author, "Albertas Agejevas <alga at pov.lt>")
+ self.assertEquals(msg.author_name, "Albertas Agejevas")
+ self.assertEquals(msg.author_email, "alga at pov.lt")
+ self.assertEquals(msg.date, datetime(2003, 9, 8, 13, 15, 51,
+ tzinfo=FixedTimezone(3*60)))
+ self.assertEquals(msg.directory, "trunk/schooltool")
+ self.assertEquals(msg.branch, None)
+ self.assertEquals(msg.log_message, """Added a period.""")
+ self.assertEquals(msg.body,
+ self.svn_msg.split("\n\n", 1)[1])
+
+ def test_parser_svnmsg_with_split_subject(self):
+ from zopeproducts.z3checkins.message import CheckinMessageParser
+ from zopeproducts.z3checkins.message import FixedTimezone
+ parser = CheckinMessageParser()
+ msg = parser.parse(StringIO(self.svn_msg_with_split_subject))
#self.assert_(ICheckinMessage.isImplementedBy(msg))
self.assertEquals(msg.message_id, "<20030908101551.6F900C32F at mail.pov.lt>")
self.assertEquals(msg.author, "Albertas Agejevas <alga at pov.lt>")
More information about the Zope3-Checkins
mailing list