lint and fix existing unit tests

This commit is contained in:
zandercymatics 2024-10-25 10:52:22 -06:00
parent d44bcadafb
commit 934d06dfb5
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 1 additions and 6 deletions

View file

@ -1573,9 +1573,6 @@ class TestRequestingEntity(WebTest):
def test_requesting_entity_page_errors(self):
"""Tests that we get the expected form errors on requesting entity"""
domain_request = completed_domain_request(user=self.user, portfolio=self.portfolio)
UserPortfolioPermission.objects.create(
portfolio=self.portfolio, user=self.user, roles=[UserPortfolioRoleChoices.ORGANIZATION_ADMIN]
)
response = self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk})).follow()
form = response.forms[0]
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]

View file

@ -2887,8 +2887,6 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
detail_page = self.app.get(f"/domain-request/{domain_request.id}")
self.assertContains(detail_page, "city.gov")
self.assertContains(detail_page, "city1.gov")
self.assertContains(detail_page, "Chief Tester")
self.assertContains(detail_page, "testy@town.com")
self.assertContains(detail_page, "Status:")
# click the "Withdraw request" button
mock_client = MockSESClient()

View file

@ -600,7 +600,7 @@ class RequestingEntity(DomainRequestWizard):
sub_organization = cleaned_data.get("sub_organization")
requested_suborganization = cleaned_data.get("requested_suborganization")
# If no suborganization presently exists but the user filled out
# If no suborganization presently exists but the user filled out
# org information then create a suborg automatically.
if is_suborganization and (sub_organization or requested_suborganization):
# Cleanup the organization name field, as this isn't for suborganizations.