forked from docs/doc-exports
spliting one case to two
This commit is contained in:
parent
ee63b08e02
commit
aa60e5f7fd
@ -167,10 +167,22 @@ class TestConvertor(TestCase):
|
|||||||
def test_streamline_html_escape_12(self):
|
def test_streamline_html_escape_12(self):
|
||||||
test_data= """
|
test_data= """
|
||||||
<p id="dli_03_0101__en-us_topic_0000001174688342_p1256384461610">DLI:*:*:database:databases.dbname</p>
|
<p id="dli_03_0101__en-us_topic_0000001174688342_p1256384461610">DLI:*:*:database:databases.dbname</p>
|
||||||
<p id="dli_03_0101__en-us_topic_0000001174688342_p4564244131615">DLI:*:*:queue:queues.*</p>
|
|
||||||
""" # noqa
|
""" # noqa
|
||||||
expected = """
|
expected = """
|
||||||
<p id="dli_03_0101__en-us_topic_0000001174688342_p1256384461610">DLI:``*``:``*``:database:databases.dbname</p>
|
<p id="dli_03_0101__en-us_topic_0000001174688342_p1256384461610">DLI:``*``:``*``:database:databases.dbname</p>
|
||||||
|
""" # noqa
|
||||||
|
soup = bs4.BeautifulSoup(test_data, 'lxml')
|
||||||
|
res = self.convertor.streamline_html(soup, "dummy")
|
||||||
|
self.assertEqual(
|
||||||
|
str(res.find('p')),
|
||||||
|
expected.strip(),
|
||||||
|
)
|
||||||
|
|
||||||
|
def test_streamline_html_escape_13(self):
|
||||||
|
test_data= """
|
||||||
|
<p id="dli_03_0101__en-us_topic_0000001174688342_p4564244131615">DLI:*:*:queue:queues.*</p>
|
||||||
|
""" # noqa
|
||||||
|
expected = """
|
||||||
<p id="dli_03_0101__en-us_topic_0000001174688342_p4564244131615">DLI:``*``:``*``:queue:queues.*</p>
|
<p id="dli_03_0101__en-us_topic_0000001174688342_p4564244131615">DLI:``*``:``*``:queue:queues.*</p>
|
||||||
""" # noqa
|
""" # noqa
|
||||||
soup = bs4.BeautifulSoup(test_data, 'lxml')
|
soup = bs4.BeautifulSoup(test_data, 'lxml')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user