def test_validate_value_list_invalid(self): sheet = OPWorkbook(self.value_lists_workbook, self.value_lists_test_config).description sheet.validate_value_list('rights_cc_x_not_in_list') self.assertEqual(len(sheet.errors), 1) self.assertRegexpMatches(sheet.errors[0], r'Rights CC-X.*not valid.*expected.*')
def test_validate_value_list_valid_value_lower_case(self): sheet = OPWorkbook(self.value_lists_workbook, self.value_lists_test_config).description sheet.validate_value_list('rights_pd_lower_case') self.assertEqual(len(sheet.errors), 0)
def test_validate_value_list_with_value_empty(self): sheet = OPWorkbook(self.value_lists_workbook, self.value_lists_test_config).description sheet.validate_value_list('rights_4_blank') self.assertEqual(len(sheet.errors), 0)