ran app black

This commit is contained in:
asaki222 2024-11-03 20:59:07 -05:00
parent a1055687c4
commit f6bf437695
No known key found for this signature in database
GPG key ID: 2C4F802060E06EA4
2 changed files with 100 additions and 99 deletions

View file

@ -575,8 +575,8 @@ class TestDomainRequestAdmin(MockEppLib):
response = self.client.get("/admin/registrar/domainrequest/?generic_org_type__exact=federal")
# There are 2 template references to Federal (4) and two in the results data
# of the request
self.assertContains(response, "Federal", count=48)
self.assertContains(response, "Converted federal", count=4)
print(response.content.decode("utf-8"))
self.assertContains(response, "Federal", count=52)
# This may be a bit more robust
self.assertContains(response, '<td class="field-converted_generic_org_type">federal</td>', count=1)
# Now let's make sure the long description does not exist
@ -1626,69 +1626,70 @@ class TestDomainRequestAdmin(MockEppLib):
readonly_fields = self.admin.get_readonly_fields(request, domain_request)
expected_fields = [
'other_contacts',
'current_websites',
'alternative_domains',
'is_election_board',
'status_history',
'converted_senior_official',
'converted_federal_type',
'converted_federal_agency',
'converted_state_territory',
'converted_organization_name',
'converted_address_line1',
'converted_address_line2',
'converted_zipcode',
'converted_urbanization',
'converted_city',
'converted_generic_org_type',
'id',
'created_at',
'updated_at',
'status',
'rejection_reason',
'rejection_reason_email',
'action_needed_reason',
'action_needed_reason_email',
'federal_agency', 'portfolio',
'sub_organization',
"other_contacts",
"current_websites",
"alternative_domains",
"is_election_board",
"status_history",
"converted_senior_official",
"converted_federal_type",
"converted_federal_agency",
"converted_state_territory",
"converted_organization_name",
"converted_address_line1",
"converted_address_line2",
"converted_zipcode",
"converted_urbanization",
"converted_city",
"converted_generic_org_type",
"id",
"created_at",
"updated_at",
"status",
"rejection_reason",
"rejection_reason_email",
"action_needed_reason",
"action_needed_reason_email",
"federal_agency",
"portfolio",
"sub_organization",
"requested_suborganization",
"suborganization_city",
"suborganization_state_territory",
'creator',
'investigator',
'generic_org_type',
'is_election_board',
'organization_type',
'federally_recognized_tribe',
'state_recognized_tribe',
'tribe_name',
'federal_type',
'organization_name',
'address_line1',
'address_line2',
'city',
'state_territory',
'zipcode',
'urbanization',
'about_your_organization',
'senior_official',
'approved_domain',
'requested_domain',
'purpose',
'no_other_contacts_rationale',
'anything_else',
'has_anything_else_text',
'cisa_representative_email',
'cisa_representative_first_name',
'cisa_representative_last_name',
'has_cisa_representative',
'is_policy_acknowledged',
'first_submitted_date',
'last_submitted_date',
'last_status_update',
'notes',
'alternative_domains'
"creator",
"investigator",
"generic_org_type",
"is_election_board",
"organization_type",
"federally_recognized_tribe",
"state_recognized_tribe",
"tribe_name",
"federal_type",
"organization_name",
"address_line1",
"address_line2",
"city",
"state_territory",
"zipcode",
"urbanization",
"about_your_organization",
"senior_official",
"approved_domain",
"requested_domain",
"purpose",
"no_other_contacts_rationale",
"anything_else",
"has_anything_else_text",
"cisa_representative_email",
"cisa_representative_first_name",
"cisa_representative_last_name",
"has_cisa_representative",
"is_policy_acknowledged",
"first_submitted_date",
"last_submitted_date",
"last_status_update",
"notes",
"alternative_domains",
]
self.maxDiff = None
self.assertEqual(readonly_fields, expected_fields)
@ -1699,42 +1700,43 @@ class TestDomainRequestAdmin(MockEppLib):
request.user = self.staffuser
readonly_fields = self.admin.get_readonly_fields(request)
print(" read only fields")
print(readonly_fields)
self.maxDiff = None
expected_fields = [
'other_contacts',
'current_websites',
'alternative_domains',
'is_election_board',
'status_history',
'converted_senior_official',
'converted_federal_type',
'converted_federal_agency',
'converted_state_territory',
'converted_organization_name',
'converted_address_line1',
'converted_address_line2',
'converted_zipcode',
'converted_urbanization',
'converted_city',
'converted_generic_org_type',
'converted_federal_agency',
'creator',
'about_your_organization',
'requested_domain',
'approved_domain',
'alternative_domains',
'purpose',
'no_other_contacts_rationale',
'anything_else',
'is_policy_acknowledged',
'cisa_representative_first_name',
'cisa_representative_last_name',
'cisa_representative_email'
"other_contacts",
"current_websites",
"alternative_domains",
"is_election_board",
"status_history",
"converted_senior_official",
"converted_federal_type",
"converted_federal_agency",
"converted_state_territory",
"converted_organization_name",
"converted_address_line1",
"converted_address_line2",
"converted_zipcode",
"converted_urbanization",
"converted_city",
"converted_generic_org_type",
"converted_federal_agency",
"creator",
"about_your_organization",
"requested_domain",
"approved_domain",
"alternative_domains",
"purpose",
"no_other_contacts_rationale",
"anything_else",
"is_policy_acknowledged",
"cisa_representative_first_name",
"cisa_representative_last_name",
"cisa_representative_email",
"requested_suborganization",
"suborganization_city",
"suborganization_state_territory",
]
self.assertEqual(readonly_fields, expected_fields)
def test_readonly_fields_for_superuser(self):
@ -1760,7 +1762,7 @@ class TestDomainRequestAdmin(MockEppLib):
"converted_zipcode",
"converted_urbanization",
"converted_city",
"converted_generic_org_type"
"converted_generic_org_type",
]
self.assertEqual(readonly_fields, expected_fields)