mirror of https://github.com/searxng/searxng.git
Fix unit test
This commit is contained in:
parent
f17e54a396
commit
1ac0c90037
|
@ -20,14 +20,22 @@ class TestAcgsouEngine(SearxTestCase):
|
||||||
self.assertEqual(acgsou.response(resp), [])
|
self.assertEqual(acgsou.response(resp), [])
|
||||||
|
|
||||||
html = """
|
html = """
|
||||||
|
<html>
|
||||||
<table id="listTable" class="list_style table_fixed">
|
<table id="listTable" class="list_style table_fixed">
|
||||||
<thead class="tcat">
|
<thead class="tcat">
|
||||||
<tr>
|
<tr>
|
||||||
tablehead
|
<th axis="string" class="l1 tableHeaderOver">发布时间</th>
|
||||||
|
<th axis="string" class="l2 tableHeaderOver">分类</th>
|
||||||
|
<th axis="string" class="l3 tableHeaderOver">资源名称</th>
|
||||||
|
<th axis="size" class="l4 tableHeaderOver">大小</th>
|
||||||
|
<th axis="number" class="l5 tableHeaderOver">种子</th>
|
||||||
|
<th axis="number" class="l6 tableHeaderOver">下载</th>
|
||||||
|
<th axis="number" class="l7 tableHeaderOver">完成</th>
|
||||||
|
<th axis="string" class="l8 tableHeaderOver">发布者/联盟</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="tbody" id="data_list">
|
<tbody class="tbody" id="data_list">
|
||||||
<tr class="alt1 ">
|
<tr class="alt1 ">
|
||||||
<td nowrap="nowrap">date</td>
|
<td nowrap="nowrap">date</td>
|
||||||
<td><a href="category.html">testcategory</a></td>
|
<td><a href="category.html">testcategory</a></td>
|
||||||
<td style="text-align:left;">
|
<td style="text-align:left;">
|
||||||
|
@ -51,7 +59,9 @@ class TestAcgsouEngine(SearxTestCase):
|
||||||
</td>
|
</td>
|
||||||
<td><a href="random.html">user</a></td>
|
<td><a href="random.html">user</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</html>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
resp = mock.Mock(text=html)
|
resp = mock.Mock(text=html)
|
||||||
|
|
Loading…
Reference in New Issue