mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 07:16:31 +01:00
Increase coverage in evennia/utils/text2html.
This commit is contained in:
parent
cea0e1a0a4
commit
7d05b3ac0d
1 changed files with 10 additions and 0 deletions
|
|
@ -91,6 +91,16 @@ class TestText2Html(TestCase):
|
|||
"a red foo",
|
||||
parser.re_double_space("a red foo"))
|
||||
|
||||
def test_sub_mxp_links(self):
|
||||
parser = text2html.HTML_PARSER
|
||||
mocked_match = mock.Mock()
|
||||
mocked_match.groups.return_value = ["cmd", "text"]
|
||||
self.assertEqual(
|
||||
r"""<a id="mxplink" href="#" """
|
||||
"""onclick="Evennia.msg("text",["cmd"],{});"""
|
||||
"""return false;">text</a>""",
|
||||
parser.sub_mxp_links(mocked_match))
|
||||
|
||||
def test_sub_text(self):
|
||||
parser = text2html.HTML_PARSER
|
||||
mocked_match = mock.Mock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue