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