Verified Commit 1c26ce52 authored by Kevin Morris's avatar Kevin Morris
Browse files

[FastAPI] include DepArch in dependency list



Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent a0be0185
......@@ -16,6 +16,9 @@
</a>
{% endif %}
{{ dep.Package | provides_list(dep.DepName) | safe }}
{% if dep.DepArch %}
<em>({{ dep.DepArch }})</em>
{% endif %}
<!-- If this dependency type is an optdepends (id: 4). -->
{% if dep.DepTypeID == 4 %}
<em>{{ dep | dep_extra_desc }}</em>
......
......@@ -228,6 +228,7 @@ def test_package_dependencies(client: TestClient, maintainer: User,
# Create a normal dependency of type depends.
dep_pkg = create_package("test-dep-1", maintainer, autocommit=False)
dep = create_package_dep(package, dep_pkg.Name, autocommit=False)
dep.DepArch = "x86_64"
# Also, create a makedepends.
make_dep_pkg = create_package("test-dep-2", maintainer, autocommit=False)
......@@ -288,6 +289,11 @@ def test_package_dependencies(client: TestClient, maintainer: User,
for i, expectation in enumerate(expected):
assert pkgdeps[i].text.strip() == expectation
# Let's make sure the DepArch was displayed for our first dep.
arch = root.findall('.//ul[@id="pkgdepslist"]/li')[0]
arch = arch.xpath('./em')[1]
assert arch.text.strip() == "(x86_64)"
broken_node = root.find('.//ul[@id="pkgdepslist"]/li/span')
assert broken_node.text.strip() == broken_dep.DepName
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment