mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep: define filters in their own modules
This patch cleans up aurweb.templates and removes direct module-level initialization of the environment. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
fca175ed84
commit
211ca5e49c
16 changed files with 159 additions and 159 deletions
|
@ -10,7 +10,7 @@ import pytest
|
|||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from aurweb import config, db, util
|
||||
from aurweb import config, db, filters
|
||||
from aurweb.models.account_type import DEVELOPER_ID, AccountType
|
||||
from aurweb.models.tu_vote import TUVote
|
||||
from aurweb.models.tu_voteinfo import TUVoteInfo
|
||||
|
@ -130,7 +130,7 @@ def test_tu_index_guest(client):
|
|||
response = request.get("/tu", allow_redirects=False, headers=headers)
|
||||
assert response.status_code == int(HTTPStatus.SEE_OTHER)
|
||||
|
||||
params = util.urlencode({"next": "/tu"})
|
||||
params = filters.urlencode({"next": "/tu"})
|
||||
assert response.headers.get("location") == f"/login?{params}"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue