Example #1
0
 def test_config_string_full(self):
     jobconf = JobConfiguration()
     jobconf.language = Language.IT
     jobconf.description = "Test description"
     jobconf.is_audio_file_name_regex = "*.mp3"
     jobconf.is_audio_file_relative_path = "."
     jobconf.is_hierarchy_prefix = "OEBPS/"
     jobconf.is_hierarchy_type = HierarchyType.FLAT
     jobconf.is_task_directory_name_regex = "[0-9]*"
     jobconf.is_text_file_format = TextFileFormat.UNPARSED
     jobconf.is_text_file_name_regex = "*.txt"
     jobconf.is_text_file_relative_path = "."
     jobconf.is_text_unparsed_class_regex = "ra"
     jobconf.is_text_unparsed_id_regex = "f[0-9]*"
     jobconf.is_text_unparsed_id_sort = IDSortingAlgorithm.NUMERIC
     jobconf.os_container_format = ContainerFormat.ZIP
     jobconf.os_hierarchy_prefix = "OEBPS/mo/"
     jobconf.os_hierarchy_type = HierarchyType.FLAT
     jobconf.os_file_name = "test_output.zip"
     expected = "job_description=Test description|job_language=it|is_audio_file_name_regex=*.mp3|is_audio_file_relative_path=.|is_hierarchy_prefix=OEBPS/|is_hierarchy_type=flat|is_task_dir_name_regex=[0-9]*|is_text_type=unparsed|is_text_file_name_regex=*.txt|is_text_file_relative_path=.|is_text_unparsed_class_regex=ra|is_text_unparsed_id_regex=f[0-9]*|is_text_unparsed_id_sort=numeric|os_job_file_name=test_output.zip|os_job_file_container=zip|os_job_file_hierarchy_type=flat|os_job_file_hierarchy_prefix=OEBPS/mo/"
     self.assertEqual(jobconf.config_string(), expected)
Example #2
0
 def test_config_string_full(self):
     jobconf = JobConfiguration()
     jobconf.language = Language.IT
     jobconf.description = "Test description"
     jobconf.is_audio_file_name_regex = "*.mp3"
     jobconf.is_audio_file_relative_path = "."
     jobconf.is_hierarchy_prefix = "OEBPS/"
     jobconf.is_hierarchy_type = HierarchyType.FLAT
     jobconf.is_task_directory_name_regex = "[0-9]*"
     jobconf.is_text_file_format = TextFileFormat.UNPARSED
     jobconf.is_text_file_name_regex = "*.txt"
     jobconf.is_text_file_relative_path = "."
     jobconf.is_text_unparsed_class_regex = "ra"
     jobconf.is_text_unparsed_id_regex = "f[0-9]*"
     jobconf.is_text_unparsed_id_sort = IDSortingAlgorithm.NUMERIC
     jobconf.os_container_format = ContainerFormat.ZIP
     jobconf.os_hierarchy_prefix = "OEBPS/mo/"
     jobconf.os_hierarchy_type = HierarchyType.FLAT
     jobconf.os_file_name = "test_output.zip"
     expected = "job_description=Test description|job_language=it|is_audio_file_name_regex=*.mp3|is_audio_file_relative_path=.|is_hierarchy_prefix=OEBPS/|is_hierarchy_type=flat|is_task_dir_name_regex=[0-9]*|is_text_type=unparsed|is_text_file_name_regex=*.txt|is_text_file_relative_path=.|is_text_unparsed_class_regex=ra|is_text_unparsed_id_regex=f[0-9]*|is_text_unparsed_id_sort=numeric|os_job_file_name=test_output.zip|os_job_file_container=zip|os_job_file_hierarchy_type=flat|os_job_file_hierarchy_prefix=OEBPS/mo/"
     self.assertEqual(jobconf.config_string(), expected)
Example #3
0
 def test_setter_12(self):
     value = "f[0-9]*"
     jobconf = JobConfiguration()
     jobconf.is_text_unparsed_id_regex = value
     self.assertEqual(jobconf.is_text_unparsed_id_regex, value)