mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: add "Last Updated" column to search results
Signed-off-by: moson-mo <mo-son@mailbox.org>
This commit is contained in:
parent
becce1aac4
commit
ec239ceeb3
3 changed files with 23 additions and 1 deletions
|
@ -5,7 +5,8 @@ from unittest import mock
|
|||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from aurweb import asgi, db, time
|
||||
from aurweb import asgi, config, db, time
|
||||
from aurweb.filters import datetime_display
|
||||
from aurweb.models import License, PackageLicense
|
||||
from aurweb.models.account_type import USER_ID, AccountType
|
||||
from aurweb.models.dependency_type import DependencyType
|
||||
|
@ -1085,6 +1086,11 @@ def test_packages_sort_by_last_modified(client: TestClient, packages: list[Packa
|
|||
col = row.xpath("./td")[0].xpath("./a")[0]
|
||||
assert col.text.strip() == package.Name
|
||||
|
||||
# Make sure our row contains the modified date we've set
|
||||
tz = config.get("options", "default_timezone")
|
||||
dt = datetime_display({"timezone": tz}, package.PackageBase.ModifiedTS)
|
||||
assert dt in "".join(row.itertext())
|
||||
|
||||
|
||||
def test_packages_flagged(
|
||||
client: TestClient, maintainer: User, packages: list[Package]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue