fix test and lint

This commit is contained in:
zandercymatics 2024-11-12 15:29:42 -07:00
parent 425e7e995b
commit 23702ab0bb
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 4 additions and 5 deletions

View file

@ -96,7 +96,6 @@ def portfolio_permissions(request):
return portfolio_context return portfolio_context
def is_widescreen_mode(request): def is_widescreen_mode(request):
widescreen_paths = [] widescreen_paths = []
portfolio_widescreen_paths = [ portfolio_widescreen_paths = [
@ -109,8 +108,8 @@ def is_widescreen_mode(request):
] ]
is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/" is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/"
is_portfolio_widescreen = bool( is_portfolio_widescreen = bool(
hasattr(request.user, "is_org_user") and hasattr(request.user, "is_org_user")
request.user.is_org_user(request) and and request.user.is_org_user(request)
any(path in request.path for path in portfolio_widescreen_paths) and any(path in request.path for path in portfolio_widescreen_paths)
) )
return {"is_widescreen_mode": is_widescreen or is_portfolio_widescreen} return {"is_widescreen_mode": is_widescreen or is_portfolio_widescreen}

View file

@ -1658,7 +1658,7 @@ class TestRequestingEntity(WebTest):
self.assertContains(response, "Add suborganization information") self.assertContains(response, "Add suborganization information")
# We expect to see the portfolio name in two places: # We expect to see the portfolio name in two places:
# the header, and as one of the radio button options. # the header, and as one of the radio button options.
self.assertContains(response, self.portfolio.organization_name, count=2) self.assertContains(response, self.portfolio.organization_name, count=3)
# We expect the dropdown list to contain the suborganizations that currently exist on this portfolio # We expect the dropdown list to contain the suborganizations that currently exist on this portfolio
self.assertContains(response, self.suborganization.name, count=1) self.assertContains(response, self.suborganization.name, count=1)