mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(python): move request & pkgbase request routes
Move package request routes and related routes to their respective routers. In addition, move some utility used for requests over from `aurweb.packages`. Introduced routers: - `aurweb.routers.requests` Introduced package: - `aurweb.requests` Introduced module: - `aurweb.requests.util` Changes: - Moved `aurweb.packages.validate` to `aurweb.pkgbase.validate` - Moved requests listing & request closure routes to `aurweb.routers.requests` - Moved pkgbase request creation route to `aurweb.routers.pkgbase` - Moved `get_pkgreq_by_id` from `aurweb.packages.util` to `aurweb.requests.util` and fixed its return type hint. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
a77d44e919
commit
a1f46611e1
10 changed files with 218 additions and 195 deletions
|
@ -2,7 +2,6 @@ from datetime import datetime
|
|||
|
||||
import pytest
|
||||
|
||||
from fastapi import HTTPException
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from aurweb import asgi, config, db
|
||||
|
@ -98,11 +97,6 @@ def test_query_notified(maintainer: User, package: Package):
|
|||
assert query_notified[package.PackageBase.ID]
|
||||
|
||||
|
||||
def test_pkgreq_by_id_not_found():
|
||||
with pytest.raises(HTTPException):
|
||||
util.get_pkgreq_by_id(0)
|
||||
|
||||
|
||||
def test_source_uri_file(package: Package):
|
||||
FILE = "test_file"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue