mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(rpc): add GET /rpc/v5/search/{arg} openapi route
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
5e75a00c17
commit
8e8b746a5b
2 changed files with 30 additions and 1 deletions
|
@ -986,6 +986,18 @@ def test_rpc_openapi_multiinfo_post_bad_request(
|
|||
assert data.get("error") == expected
|
||||
|
||||
|
||||
def test_rpc_openapi_search_arg(client: TestClient, packages: list[Package]):
|
||||
pkgname = packages[0].Name
|
||||
|
||||
with client as request:
|
||||
endp = f"/rpc/v5/search/{pkgname}"
|
||||
resp = request.get(endp)
|
||||
assert resp.status_code == HTTPStatus.OK
|
||||
|
||||
data = resp.json()
|
||||
assert data.get("resultcount") == 1
|
||||
|
||||
|
||||
def test_rpc_openapi_search(client: TestClient, packages: list[Package]):
|
||||
pkgname = packages[0].Name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue