Ejemplo n.º 1
0
 def testFullyFormedResult(self):
     br = BonsaiParser(goodUnparsedResult)
     result = br.getData()
     # make sure the result is a BonsaiResult
     self.failUnless(isinstance(result, BonsaiResult))
     # test for successful parsing
     self.failUnlessEqual(goodParsedResult, result,
         "BonsaiParser did not return the expected BonsaiResult")
Ejemplo n.º 2
0
 def testMergeEmptyLogMsg(self):
     """Ensure that BonsaiPoller works around the bonsai xml output
     issue when the check-in comment is empty"""
     bp = BonsaiParser(noCheckinMsgResult)
     result = bp.getData()
     self.failUnlessEqual(len(result.nodes), 1)
     self.failUnlessEqual(result.nodes[0].who, "*****@*****.**")
     self.failUnlessEqual(result.nodes[0].date, 12345678)
     self.failUnlessEqual(result.nodes[0].log, "")
     for file, ref in zip(result.nodes[0].files, noCheckinMsgRef):
         self.failUnlessEqual(file.filename, ref['filename'])
         self.failUnlessEqual(file.revision, ref['revision'])
 def testMergeEmptyLogMsg(self):
     """Ensure that BonsaiPoller works around the bonsai xml output
     issue when the check-in comment is empty"""
     bp = BonsaiParser(noCheckinMsgResult)
     result = bp.getData()
     self.failUnlessEqual(len(result.nodes), 1)
     self.failUnlessEqual(result.nodes[0].who, "*****@*****.**")
     self.failUnlessEqual(result.nodes[0].date, 12345678)
     self.failUnlessEqual(result.nodes[0].log, "")
     for file, ref in zip(result.nodes[0].files, noCheckinMsgRef):
         self.failUnlessEqual(file.filename, ref['filename'])
         self.failUnlessEqual(file.revision, ref['revision'])
Ejemplo n.º 4
0
 def testMissingCiResult(self):
     try:
         BonsaiParser(missingCiResult)
         self.fail(badResultMsgs["missingCiResult"])
     except EmptyResult:
         pass
Ejemplo n.º 5
0
 def testDuplicateFilesResult(self):
     try:
         BonsaiParser(duplicateFilesResult)
         self.fail(badResultMsgs["duplicateFilesResult"])
     except InvalidResultError:
         pass
Ejemplo n.º 6
0
 def testMissingFilenameResult(self):
     try:
         BonsaiParser(missingFilenameResult)
         self.fail(badResultMsgs["missingFilenameResult"])
     except InvalidResultError:
         pass
Ejemplo n.º 7
0
 def testInvalidDateResult(self):
     try:
         BonsaiParser(invalidDateResult)
         self.fail(badResultMsgs["invalidDateResult"])
     except InvalidResultError:
         pass
Ejemplo n.º 8
0
 def testBadUnparsedResult(self):
     try:
         BonsaiParser(badUnparsedResult)
         self.fail(badResultMsgs["badUnparsedResult"])
     except InvalidResultError:
         pass