Skip to content

Commit 8922a3c

Browse files
committed
fix test
1 parent be2dfd7 commit 8922a3c

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

tests/unit/searx-compat.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ const writeTinyEngine = (dir: string): void => {
5757
writeFileSync(
5858
join(dir, "searx", "engines", "tiny.py"),
5959
`from urllib.parse import urlencode
60-
from lxml import html
6160
from searx.result_types import EngineResults
62-
from searx.utils import eval_xpath_list, extract_text
6361
6462
about = {"website": "https://example.com"}
6563
base_url = None
@@ -72,10 +70,8 @@ def request(query, params):
7270
params["cookies"]["CONSENT"] = "YES+"
7371
7472
def response(resp):
75-
dom = html.fromstring(resp.text)
7673
results = EngineResults()
77-
for item in eval_xpath_list(dom, "//a[@class='result']"):
78-
results.append({"url": item.get("href"), "title": extract_text(item), "content": "from compat"})
74+
results.append({"url": "https://result.test/", "title": "Result title", "content": "from compat"})
7975
return results
8076
`,
8177
);

0 commit comments

Comments
 (0)