[Buildbot-commits] buildbot/buildbot/test test_mailparse.py, 1.5, 1.6
Brian Warner
warner at users.sourceforge.net
Sat Jul 28 05:57:52 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28244/buildbot/test
Modified Files:
test_mailparse.py
Log Message:
[project @ changes/mail.py: refactor, giving each parser a separate subclass]
Original author: warner at lothar.com
Date: 2007-07-28 05:38:27+00:00
Index: test_mailparse.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_mailparse.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- test_mailparse.py 6 Sep 2006 00:41:55 -0000 1.5
+++ test_mailparse.py 28 Jul 2007 05:57:50 -0000 1.6
@@ -2,13 +2,14 @@
from twisted.trial import unittest
from twisted.python import util
-from buildbot.changes.mail import parseFreshCVSMail, parseSyncmail
+from buildbot.changes.mail import FCMaildirSource, SyncmailMaildirSource
class Test1(unittest.TestCase):
def get(self, msg):
msg = util.sibpath(__file__, msg)
- return parseFreshCVSMail(None, open(msg, "r"))
+ s = FCMaildirSource(None)
+ return s.parse(open(msg, "r"))
def testMsg1(self):
c = self.get("mail/msg1")
@@ -110,7 +111,8 @@
class Test2(unittest.TestCase):
def get(self, msg):
msg = util.sibpath(__file__, msg)
- return parseFreshCVSMail(None, open(msg, "r"), prefix="Twisted")
+ s = FCMaildirSource(None)
+ return s.parse(open(msg, "r"), prefix="Twisted")
def testMsg1p(self):
c = self.get("mail/msg1")
@@ -196,11 +198,13 @@
class Test3(unittest.TestCase):
def get(self, msg):
msg = util.sibpath(__file__, msg)
- return parseSyncmail(None, open(msg, "r"), prefix="buildbot")
+ s = SyncmailMaildirSource(None)
+ return s.parse(open(msg, "r"), prefix="buildbot")
def getNoPrefix(self, msg):
msg = util.sibpath(__file__, msg)
- return parseSyncmail(None, open(msg, "r"))
+ s = SyncmailMaildirSource(None)
+ return s.parse(open(msg, "r"))
def testMsgS1(self):
c = self.get("mail/syncmail.1")
More information about the Commits
mailing list