dnscms: show the Galtinn ID in the user listing
dnscms / ci (push) Successful in 1m2s

This commit is contained in:
ponas committed 2026-10-09 17:25:48 +02:00
1 parent dcb325b111
commit 866847ecc6
4 files changed
+48 -2

No files matched your search

+13
View File
@@ -375,3 +375,16 @@ def test_account_page_requires_login(client):
assert response.status_code == 302
assert reverse("wagtailadmin_login") in response.url
def test_user_listing_shows_galtinn_id_after_username(client, django_user_model):
admin = django_user_model.objects.create_superuser(username="admin", password="pw")
link(django_user_model.objects.create_user(username="kari"), galtinn_id="15284")
client.force_login(admin)
response = client.get(reverse("wagtailusers_users:index"))
names = list(response.context["table"].columns)
assert names.index("galtinn_id") == names.index("username") + 1
assert "Galtinn-ID" in response.content.decode()
assert ">15284<" in re.sub(r"\s+", "", response.content.decode())