mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
check-templates: Extract/improve report_problem.
We extract the function for modularity and to allow early-return. We also add checks for "else" and improve a few error messages.
This commit is contained in:
@@ -84,7 +84,7 @@ class ParserTest(unittest.TestCase):
|
||||
my_html = """
|
||||
<b>foo</i>
|
||||
"""
|
||||
self._assert_validate_error("Mismatched tag.", text=my_html)
|
||||
self._assert_validate_error(r"Mismatched tags: \(b != i\)", text=my_html)
|
||||
|
||||
def test_validate_bad_indentation(self) -> None:
|
||||
my_html = """
|
||||
@@ -92,7 +92,7 @@ class ParserTest(unittest.TestCase):
|
||||
foo
|
||||
</p>
|
||||
"""
|
||||
self._assert_validate_error("Bad indentation.", text=my_html)
|
||||
self._assert_validate_error("Indentation for start/end tags does not match.", text=my_html)
|
||||
|
||||
def test_validate_state_depth(self) -> None:
|
||||
my_html = """
|
||||
|
||||
Reference in New Issue
Block a user