Linting, fix test

This commit is contained in:
zandercymatics 2024-02-15 14:04:36 -07:00
parent 227083462d
commit 133c435f03
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 8 additions and 1 deletions

View file

@ -1,4 +1,5 @@
"""This file contains general purpose helpers that don't belong in any specific location""" """This file contains general purpose helpers that don't belong in any specific location"""
import time import time
import logging import logging

View file

@ -985,7 +985,13 @@ class TestDomainApplicationAdmin(MockEppLib):
self.client.login(username="staffuser", password=p) self.client.login(username="staffuser", password=p)
request = RequestFactory().get("/") request = RequestFactory().get("/")
expected_list = list(User.objects.filter(is_staff=True).order_by("first_name", "last_name", "email")) # These names have metadata embedded in them. :investigator implicitly tests if
# these are actually from the attribute "investigator".
expected_list = [
"AGuy AGuy last_name:investigator",
"FinalGuy FinalGuy last_name:investigator",
"SomeGuy first_name:investigator SomeGuy last_name:investigator",
]
# Get the actual sorted list of investigators from the lookups method # Get the actual sorted list of investigators from the lookups method
actual_list = [item for _, item in self.admin.InvestigatorFilter.lookups(self, request, self.admin)] actual_list = [item for _, item in self.admin.InvestigatorFilter.lookups(self, request, self.admin)]