diff --git a/templates/partials/packages/details.html b/templates/partials/packages/details.html
index cdb62128..86bc1de5 100644
--- a/templates/partials/packages/details.html
+++ b/templates/partials/packages/details.html
@@ -17,7 +17,7 @@
-
+
{{ "Description" | tr }}: |
{{ package.Description }} |
diff --git a/test/test_packages_routes.py b/test/test_packages_routes.py
index a707bbac..6e92eeff 100644
--- a/test/test_packages_routes.py
+++ b/test/test_packages_routes.py
@@ -304,6 +304,50 @@ def test_package(client: TestClient, package: Package):
assert conflicts[0].text.strip() == ", ".join(expected)
+def test_package_split_description(client: TestClient, user: User):
+
+ with db.begin():
+ pkgbase = db.create(
+ PackageBase,
+ Name="pkgbase",
+ Maintainer=user,
+ Packager=user,
+ )
+
+ pkg_a = db.create(
+ Package,
+ PackageBase=pkgbase,
+ Name="pkg_a",
+ Description="pkg_a desc",
+ )
+ pkg_b = db.create(
+ Package,
+ PackageBase=pkgbase,
+ Name="pkg_b",
+ Description="pkg_b desc",
+ )
+
+ # Check pkg_a
+ with client as request:
+ endp = f"/packages/{pkg_a.Name}"
+ resp = request.get(endp)
+ assert resp.status_code == HTTPStatus.OK
+
+ root = parse_root(resp.text)
+ row = root.xpath('//tr[@id="pkg-description"]/td')[0]
+ assert row.text == pkg_a.Description
+
+ # Check pkg_b
+ with client as request:
+ endp = f"/packages/{pkg_b.Name}"
+ resp = request.get(endp)
+ assert resp.status_code == HTTPStatus.OK
+
+ root = parse_root(resp.text)
+ row = root.xpath('//tr[@id="pkg-description"]/td')[0]
+ assert row.text == pkg_b.Description
+
+
def paged_depends_required(client: TestClient, package: Package):
maint = package.PackageBase.Maintainer
new_pkgs = []
diff --git a/test/test_templates.py b/test/test_templates.py
index 383f45d1..f80e68eb 100644
--- a/test/test_templates.py
+++ b/test/test_templates.py
@@ -293,7 +293,7 @@ def test_package_details(user: User, package: Package):
"git_clone_uri_anon": GIT_CLONE_URI_ANON,
"git_clone_uri_priv": GIT_CLONE_URI_PRIV,
"pkgbase": package.PackageBase,
- "pkg": package,
+ "package": package,
"comaintainers": [],
}
)
@@ -329,7 +329,7 @@ def test_package_details_filled(user: User, package: Package):
"git_clone_uri_anon": GIT_CLONE_URI_ANON,
"git_clone_uri_priv": GIT_CLONE_URI_PRIV,
"pkgbase": package.PackageBase,
- "pkg": package,
+ "package": package,
"comaintainers": [],
"licenses": package.package_licenses,
"provides": package.package_relations.filter(