mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
lint and fix tests
This commit is contained in:
parent
88e8b2dbeb
commit
f4c48b55b4
3 changed files with 7 additions and 15 deletions
|
@ -286,7 +286,7 @@ def validate_user_portfolio_permission(user_portfolio_permission):
|
|||
raise ValidationError(
|
||||
"This user is already assigned to a portfolio. "
|
||||
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
|
||||
code="has_existing_permissions"
|
||||
code="has_existing_permissions",
|
||||
)
|
||||
|
||||
existing_invitations = PortfolioInvitation.objects.filter(email=user_portfolio_permission.user.email).exclude(
|
||||
|
@ -297,7 +297,7 @@ def validate_user_portfolio_permission(user_portfolio_permission):
|
|||
raise ValidationError(
|
||||
"This user is already assigned to a portfolio invitation. "
|
||||
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
|
||||
code="has_existing_invitations"
|
||||
code="has_existing_invitations",
|
||||
)
|
||||
|
||||
|
||||
|
@ -359,14 +359,14 @@ def validate_portfolio_invitation(portfolio_invitation):
|
|||
raise ValidationError(
|
||||
"This user is already assigned to a portfolio. "
|
||||
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
|
||||
code="has_existing_permissions"
|
||||
code="has_existing_permissions",
|
||||
)
|
||||
|
||||
if existing_invitations.exists():
|
||||
raise ValidationError(
|
||||
"This user is already assigned to a portfolio invitation. "
|
||||
"Based on current waffle flag settings, users cannot be assigned to multiple portfolios.",
|
||||
code="has_existing_invitations"
|
||||
code="has_existing_invitations",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -3873,11 +3873,7 @@ class TestPortfolioInviteNewMemberView(MockEppLib, WebTest):
|
|||
# verify messages
|
||||
self.assertContains(
|
||||
response,
|
||||
(
|
||||
"This user is already assigned to a portfolio invitation. "
|
||||
"Based on current waffle flag settings, users cannot be assigned "
|
||||
"to multiple portfolios."
|
||||
),
|
||||
("This user has already been invited to another .gov organization."),
|
||||
)
|
||||
|
||||
# Validate Database has not changed
|
||||
|
@ -3915,11 +3911,7 @@ class TestPortfolioInviteNewMemberView(MockEppLib, WebTest):
|
|||
# Verify messages
|
||||
self.assertContains(
|
||||
response,
|
||||
(
|
||||
"This user is already assigned to a portfolio. "
|
||||
"Based on current waffle flag settings, users cannot be "
|
||||
"assigned to multiple portfolios."
|
||||
),
|
||||
("This user is already a member of another .gov organization."),
|
||||
)
|
||||
|
||||
# Validate Database has not changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue