fix: link to user account in last votes by tu listing

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-02-04 18:04:47 -08:00
parent ab1479925b
commit 987f9eab3b
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 7 additions and 1 deletions

View file

@ -18,7 +18,11 @@
{% else %}
{% for vote in votes %}
<tr>
<td>{{ vote.Username }}</td>
<td>
<a href="/account/{{ vote.Username }}">
{{ vote.Username }}
</a>
</td>
<td>
<a href="/tu/{{ vote.LastVote }}">
{{ vote.LastVote }}

View file

@ -251,6 +251,7 @@ def test_tu_index(client, tu_user):
# Check to see the rows match up to our user and related vote.
username, vote_id = rows[0]
username = username.xpath("./a")[0]
vote_id = vote_id.xpath("./a")[0]
assert username.text.strip() == tu_user.Username
assert int(vote_id.text.strip()) == vote_records[1].ID
@ -464,6 +465,7 @@ def test_tu_index_last_votes(client, tu_user, user):
last_vote = rows[0]
user, vote_id = last_vote.xpath("./td")
user = user.xpath("./a")[0]
vote_id = vote_id.xpath("./a")[0]
assert user.text.strip() == tu_user.Username