Browse Source

Fix unit test

rinpatch 6 years ago
parent
commit
1ac0c90037
No account linked to committer's email
1 changed files with 12 additions and 2 deletions
  1. 12
    2
      tests/unit/engines/test_acgsou.py

+ 12
- 2
tests/unit/engines/test_acgsou.py View File

20
         self.assertEqual(acgsou.response(resp), [])
20
         self.assertEqual(acgsou.response(resp), [])
21
 
21
 
22
         html = """
22
         html = """
23
+        <html>
23
 <table id="listTable" class="list_style table_fixed">
24
 <table id="listTable" class="list_style table_fixed">
24
   <thead class="tcat">
25
   <thead class="tcat">
25
       <tr>
26
       <tr>
26
-      tablehead
27
+        <th axis="string" class="l1 tableHeaderOver">发布时间</th>
28
+        <th axis="string" class="l2 tableHeaderOver">分类</th>
29
+        <th axis="string" class="l3 tableHeaderOver">资源名称</th>
30
+        <th axis="size" class="l4 tableHeaderOver">大小</th>
31
+        <th axis="number" class="l5 tableHeaderOver">种子</th>
32
+        <th axis="number" class="l6 tableHeaderOver">下载</th>
33
+        <th axis="number" class="l7 tableHeaderOver">完成</th>
34
+        <th axis="string" class="l8 tableHeaderOver">发布者/联盟</th>
27
       </tr>
35
       </tr>
28
   </thead>
36
   </thead>
29
   <tbody class="tbody" id="data_list">
37
   <tbody class="tbody" id="data_list">
30
-              <tr class="alt1 ">
38
+ <tr class="alt1 ">
31
         <td nowrap="nowrap">date</td>
39
         <td nowrap="nowrap">date</td>
32
         <td><a href="category.html">testcategory</a></td>
40
         <td><a href="category.html">testcategory</a></td>
33
         <td style="text-align:left;">
41
         <td style="text-align:left;">
51
         </td>
59
         </td>
52
         <td><a href="random.html">user</a></td>
60
         <td><a href="random.html">user</a></td>
53
       </tr>
61
       </tr>
62
+      </tbody>
54
 </table>
63
 </table>
64
+</html>
55
         """
65
         """
56
 
66
 
57
         resp = mock.Mock(text=html)
67
         resp = mock.Mock(text=html)