def test_convert_admonitions_asciidoc_dita(self): converter = Converter("asciidoc", "dita") converted_file = converter.convert(self.get_sample("Admonitions.adoc"), self.generate_output_filename()) assert_xml(converted_file) with open(converted_file, 'r') as converted_fd: converted_content = converted_fd.read() assert 'A NOTE admonition block' in converted_content assert 'A CAUTION admonition block' in converted_content assert 'A TIP admonition block' in converted_content assert 'A WARNING admonition block' in converted_content assert 'An IMPORTANT admonition block' in converted_content
def test_docbooktodita_docbook_dita(self): converter = DocBookToDita() converted_file = converter.convert(self.get_sample("docbook.xml"), "docbook", "dita", self.generate_output_filename()) assert_xml(converted_file)
def test_asciidoctor_asciidoc_docbook(self): converter = AsciiDoctor() converted_file = converter.convert(self.get_sample("asciidoc.txt"), "asciidoc", "docbook", self.generate_output_filename()) assert_xml(converted_file)
def test_convert_asciidoc_dita(self): converter = Converter("asciidoc", "dita") converted_file = converter.convert(self.get_sample("asciidoc.txt"), self.generate_output_filename()) assert_xml(converted_file)
def test_convert_docbook_dita(self): converter = Converter("docbook", "dita") converted_file = converter.convert(self.get_sample("docbook.xml"), self.generate_output_filename()) assert_xml(converted_file)
def test_convert_asciidoc_docbook__asciidoc_not_present(self): converter = Converter("asciidoc", "docbook") converted_file = converter.convert(self.get_sample("asciidoc.txt"), self.generate_output_filename()) assert_xml(converted_file)