Exemple #1
0
 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))
Exemple #2
0
 def loadCustomers(self):
     readCSVFile = ReadCSVFile()
     customerData = readCSVFile.getFileData("customer")
     return customerData
Exemple #3
0
 def test_FirstItem(self):
     readCSVFile = ReadCSVFile()
     self.assertEqual("emailAddress",
                      readCSVFile.getFileData("customer.csv")[0][0])
Exemple #4
0
def test_getFileData():
    if "emailAddress" == ReadCSVFile.getFileData("customer.csv")[0][0]:
        print("Pass","test_getFileData")
    else:
        print("fail", "test_getFileData")
Exemple #5
0
 def Load_Customers(self):
     readCSVFile = ReadCSVFile()
     customerData = readCSVFile.getFileData("customer.csv")
     return customerData