def test_LastLineMock(self): readCSVFile = ReadCSVFile() propertydata = [] propertydata.append("emailAddress, firstName, lastName, password") propertydata.append( "test1:testemail, testfirst, testlast, testpassword") propertydata.append( "test2:testemail2, testfirst2, testlast2, testpassword2") readCSVFile.getFileData = MagicMock(return_value=propertydata) self.assertEqual( "test2:testemail2, testfirst2, testlast2, testpassword2", readCSVFile.getLastLines("customer.csv", 1))
def test_lastLine(self): readCSVFile = ReadCSVFile() self.assertEqual( ["*****@*****.**", "Ethan", "Kelly", "9876"], readCSVFile.getLastLines("customer.csv", 1))