本文整理汇总了Python中aeneas.validator.Validator类的典型用法代码示例。如果您正苦于以下问题:Python Validator类的具体用法?Python Validator怎么用?Python Validator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Validator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_check_task_configuration_19
def test_check_task_configuration_19(self):
logger = Logger()
validator = Validator(logger=logger)
string = "task_language=it|is_text_type=unparsed|is_text_unparsed_class_regex=ra|is_text_unparsed_id_regex=f[0-9]*|os_task_file_name=output.txt|os_task_file_format=txt"
result = validator.check_task_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例2: test_check_task_configuration_20
def test_check_task_configuration_20(self):
logger = Logger()
validator = Validator(logger=logger)
string = "task_language=it|is_text_type=plain|os_task_file_name=output.txt|os_task_file_format=smil|os_task_file_smil_page_ref=page.xhtml|os_task_file_smil_audio_ref=../Audio/audio.mp3"
result = validator.check_task_configuration(string)
self.assertTrue(result.passed)
self.assertEqual(len(result.errors), 0)
示例3: test_check_task_configuration_08
def test_check_task_configuration_08(self):
logger = Logger()
validator = Validator(logger=logger)
string = "task_language=it|is_text_type=plain|missing=other"
result = validator.check_task_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例4: test_check_task_configuration_16
def test_check_task_configuration_16(self):
logger = Logger()
validator = Validator(logger=logger)
string = "task_language=it|is_text_type=unparsed|is_text_unparsed_id_regex=f[0-9]*|is_text_unparsed_id_sort=numeric|os_task_file_name=output.txt|os_task_file_format=txt"
result = validator.check_task_configuration(string)
self.assertTrue(result.passed)
self.assertEqual(len(result.errors), 0)
示例5: test_check_task_configuration_06
def test_check_task_configuration_06(self):
logger = Logger()
validator = Validator(logger=logger)
string = "not=relevant|config=string"
result = validator.check_task_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例6: test_check_job_configuration_17
def test_check_job_configuration_17(self):
logger = Logger()
validator = Validator(logger=logger)
string = "job_language=it|os_job_file_name=output.zip|os_job_file_container=zip|os_job_file_hierarchy_type=flat"
result = validator.check_job_configuration(string)
self.assertTrue(result.passed)
self.assertEqual(len(result.errors), 0)
示例7: test_check_job_configuration_14
def test_check_job_configuration_14(self):
logger = Logger()
validator = Validator(logger=logger)
string = "job_language=it|os_job_file_name=output.zip|os_job_file_container=zip|is_hierarchy_type=paged"
result = validator.check_job_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例8: test_check_task_configuration_23
def test_check_task_configuration_23(self):
logger = Logger()
validator = Validator(logger=logger)
string = "task_language=it|is_text_type=plain|os_task_file_name=output.txt|os_task_file_format=smil"
result = validator.check_task_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例9: test_check_job_configuration_02
def test_check_job_configuration_02(self):
logger = Logger()
validator = Validator(logger=logger)
string = "dummy config string with ~ reserved characters"
result = validator.check_job_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例10: test_check_job_configuration_07
def test_check_job_configuration_07(self):
logger = Logger()
validator = Validator(logger=logger)
string = "job_language=it|missing=other"
result = validator.check_job_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例11: test_check_job_configuration_08
def test_check_job_configuration_08(self):
logger = Logger()
validator = Validator(logger=logger)
string = "job_language=it|os_job_file_name=output.zip"
result = validator.check_job_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例12: test_check_container_xml_05
def test_check_container_xml_05(self):
logger = Logger()
validator = Validator(logger=logger)
container_path = get_abs_path("res/validator/job_xml_config_bad_4")
result = validator.check_container(container_path)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例13: test_check_job_configuration_05
def test_check_job_configuration_05(self):
logger = Logger()
validator = Validator(logger=logger)
string = "malformed="
result = validator.check_job_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例14: test_check_job_configuration_01
def test_check_job_configuration_01(self):
logger = Logger()
validator = Validator(logger=logger)
string = u"dummy config string with bad encoding é".encode("latin-1")
result = validator.check_job_configuration(string)
self.assertFalse(result.passed)
self.assertGreater(len(result.errors), 0)
示例15: test_check_container_xml_07
def test_check_container_xml_07(self):
logger = Logger()
validator = Validator(logger=logger)
container_path = get_abs_path("res/validator/job_xml_config_not_root_nested")
result = validator.check_container(container_path)
self.assertTrue(result.passed)
self.assertEqual(len(result.errors), 0)