def test_ReadChangesetInformationFromFile_InUtf8_ShouldBeSuccesful(self): shell.setencoding("UTF-8") sample_file_path = self.get_Sample_File_Path( "SampleCompareOutputInUtf8.txt") changeentries = ImportHandler.getchangeentriesfromfile( sample_file_path) self.assertEqual(1, len(changeentries)) author = "John ÆØÅ" mail = "*****@*****.**" self.assert_Change_Entry(changeentries[0], author, mail, "Comment", "2015-05-26 10:40:00")
def test_ReadChangesetInformationFromFile_WithLineBreakInComment_ShouldBeSuccesful( self): sample_file_path = self.get_Sample_File_Path( "SampleCompareOutputWithLineBreaks.txt") changeentries = ImportHandler.getchangeentriesfromfile( sample_file_path) self.assertEqual(2, len(changeentries)) author = "Jon Doe" mail = "*****@*****.**" self.assert_Change_Entry(changeentries[0], author, mail, "My first commit in rtc! :D", "2015-05-26 10:40:00") expectedcomment = "I want to commit on my flight to Riga :(" + os.linesep + "This is a new line" self.assert_Change_Entry(changeentries[1], author, mail, expectedcomment, "2015-05-26 10:42:00")
def test_ReadChangesetInformationFromFile_WithMultipleComponents(self): sample_file_path = self.get_Sample_File_Path( "SampleCompareOutputWithComponents.txt") changeentries = ImportHandler.getchangeentriesfromfile( sample_file_path) self.assertEqual(4, len(changeentries)) author = "Bubba Gump" mail = "*****@*****.**" self.assert_Change_Entry(changeentries[0], author, mail, "1234: work item - commit 1", "2015-06-07 16:34:22", "_2mytestcomponent2-UUID") self.assert_Change_Entry(changeentries[1], author, mail, "1234: work item - commit 3", "2015-08-25 16:15:50", "_2mytestcomponent2-UUID") self.assert_Change_Entry(changeentries[2], author, mail, "1234: work item - commit 2", "2015-06-08 16:34:22", "_3mytestcomponent3-UUID") self.assert_Change_Entry(changeentries[3], author, mail, "1234: work item - commit 4", "2015-08-26 16:15:50", "_3mytestcomponent3-UUID")