def test_check_file_exists(self): ''' vendor_guid outcome_group_vendor_guid parent_outcome_group_vendor_guid title description calculation_method calculation_int mastery_points 1 2 3 4 ''' self.assertTrue(os.path.exists(self.path_to_valid_file)) outcomes_file = checkFileReturnCSVReader(self.path_to_valid_file) self.assertTrue(outcomes_file)
def test_check_validates_first_row(self): outcomes_file = checkFileReturnCSVReader(self.path_to_valid_file) first_row = outcomes_file.next() fields = ('vendor_guid','outcome_group_vendor_guid','parent_outcome_group_vendor_guid','title','description','calculation_method','calculation_int','mastery_points','1','2','3','4') for idx,f in enumerate(fields): self.assertEqual(first_row[idx],f) second_row = outcomes_file.next() self.assertTrue(isValidRow(second_row))
def test_check_validates_first_row(self): outcomes_file = checkFileReturnCSVReader(self.path_to_valid_file) first_row = outcomes_file.next() fields = ('vendor_guid', 'outcome_group_vendor_guid', 'parent_outcome_group_vendor_guid', 'title', 'description', 'calculation_method', 'calculation_int', 'mastery_points', '1', '2', '3', '4') for idx, f in enumerate(fields): self.assertEqual(first_row[idx], f) second_row = outcomes_file.next() self.assertTrue(isValidRow(second_row))