from unittest import TestCase from bs4 import BeautifulSoup from html_to_django.formatters import block_formatter class BlockTests(TestCase): def test_basic(self) -> None: soup = BeautifulSoup('
', "html.parser") block_formatter.format(soup) expected_result = "{% block content %}{% endblock %}" self.assertEqual(expected_result, str(soup)) def test_with_content(self) -> None: soup = BeautifulSoup('