def setUp(self): self.testutils = TestUtils() self.root = settings.PROJECT_DIR self.failed = Build.from_file(self.testutils.write_to_temp('FAILED_LOG.xml', BuildBreakerTests.FAILED_LOG_AT_OCT_11)) self.did_not_fix = Build.from_file(self.testutils.write_to_temp('PASSED_LOG_AT_OCT_11.xml', BuildBreakerTests.DID_NOT_FIX_IT_LOG)) self.fixed_it = Build.from_file(self.testutils.write_to_temp('ANOTHER_PASSED_LOG_AT_OCT_11.xml', BuildBreakerTests.FIXED_IT_LOG)) self.another_pass = Build.from_file(self.testutils.write_to_temp('FAILED_LOG_AT_OCT_11.xml', BuildBreakerTests.ANOTHER_PASS))
def setUp(self): self.testutils = TestUtils() self.root = settings.PROJECT_DIR self.failed = Build.from_file(self.testutils.write_to_temp('FAILED_LOG.xml', BuildsTest.FAILED_LOG)) self.passed_at_oct_11 = Build.from_file(self.testutils.write_to_temp('PASSED_LOG_AT_OCT_11.xml', BuildsTest.PASSED_LOG_AT_OCT_11)) self.another_passed_at_oct_11 = Build.from_file(self.testutils.write_to_temp('ANOTHER_PASSED_LOG_AT_OCT_11.xml', BuildsTest.ANOTHER_PASSED_LOG_AT_OCT_11)) self.failed_at_oct_11 = Build.from_file(self.testutils.write_to_temp('FAILED_LOG_AT_OCT_11.xml', BuildsTest.FAILED_LOG_AT_OCT_11))
def testToParseTheFailedLogForBuildDate(self): expecteddate = datetime(2009, 10, 11, 17, 39, 22); build = Build.from_file(self.ccroot + '/log20091011173922Lbuild.1.xml') self.assertEqual(expecteddate, build.start_time)
def testToParseTheFailedLogForBuildDate(self): expecteddate = datetime(2009, 10, 11, 20, 11, 49); build = Build.from_file(self.ccroot + '/log20091013220324.xml') self.assertEqual(expecteddate, build.last_pass)
def testToParseThePassPassedLogForResult(self): build = Build.from_file(self.ccroot + '/log20091011173922Lbuild.1.xml') self.assertEqual(True, build.is_passed)
def testToParseThePassFailedLogForResult(self): build = Build.from_file(self.ccroot + '/log20091013220324.xml') self.assertEqual(False, build.is_passed)
def testToParseTheFailedLogForBuildNumber(self): build = Build.from_file(self.ccroot + '/log20091013220324.xml') self.assertEqual("build.18", build.number)
def testToParseThePassLogForBuildNumber(self): build = Build.from_file(self.ccroot + '/log20091011173922Lbuild.1.xml') self.assertEqual("build.1", build.number)
def testToParseTheProjectName(self): build = Build.from_file(self.ccroot + '/log20091011173922Lbuild.1.xml') self.assertEqual("connectfour4", build.name)