|
@@ -1,3 +1,4 @@
|
|
1
|
+# coding=utf-8
|
1
|
2
|
from collections import defaultdict
|
2
|
3
|
import mock
|
3
|
4
|
from searx.engines import acgsou
|
|
@@ -19,7 +20,7 @@ class TestAcgsouEngine(SearxTestCase):
|
19
|
20
|
resp = mock.Mock(text='<html></html>')
|
20
|
21
|
self.assertEqual(acgsou.response(resp), [])
|
21
|
22
|
|
22
|
|
- html = """
|
|
23
|
+ html = u"""
|
23
|
24
|
<html>
|
24
|
25
|
<table id="listTable" class="list_style table_fixed">
|
25
|
26
|
<thead class="tcat">
|
|
@@ -37,9 +38,9 @@ class TestAcgsouEngine(SearxTestCase):
|
37
|
38
|
<tbody class="tbody" id="data_list">
|
38
|
39
|
<tr class="alt1 ">
|
39
|
40
|
<td nowrap="nowrap">date</td>
|
40
|
|
- <td><a href="category.html">testcategory</a></td>
|
|
41
|
+ <td><a href="category.html">testcategory テスト</a></td>
|
41
|
42
|
<td style="text-align:left;">
|
42
|
|
- <a href="show-torrentid.html" target="_blank">torrentname</a>
|
|
43
|
+ <a href="show-torrentid.html" target="_blank">torrentname テスト</a>
|
43
|
44
|
</td>
|
44
|
45
|
<td>1MB</td>
|
45
|
46
|
<td nowrap="nowrap">
|
|
@@ -72,6 +73,6 @@ class TestAcgsouEngine(SearxTestCase):
|
72
|
73
|
|
73
|
74
|
r = results[0]
|
74
|
75
|
self.assertEqual(r['url'], 'http://www.acgsou.com/show-torrentid.html')
|
75
|
|
- self.assertEqual(r['content'], 'Category: "testcategory".')
|
76
|
|
- self.assertEqual(r['title'], 'torrentname')
|
|
76
|
+ self.assertEqual(r['content'], u'Category: "testcategory テスト".')
|
|
77
|
+ self.assertEqual(r['title'], u'torrentname テスト')
|
77
|
78
|
self.assertEqual(r['filesize'], 1048576)
|