Beispiel #1
0
    def test_input_string_get_html_css(self):
        md = Markdown(
            '<style>\n  *{color:red}\n</style>\n\n# header-1\n\n`test`')

        style = md.get_html_css()

        self.assertEqual(style, '<style>  *{color:red}</style>\n')
Beispiel #2
0
    def test_input_file_get_html_css(self):
        i = tempfile.TemporaryFile('r+w')
        i.write('<style>\n  *{color:red}\n</style>\n\n# header-1\n\n`test`')
        i.seek(0)
        md = Markdown(i)

        style = md.get_html_css()

        self.assertEqual(style, '<style>  *{color:red}</style>\n')