mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-27 04:58:42 +02:00
changes thus far
This commit is contained in:
parent
b51251ff3a
commit
24dd5e71a4
4 changed files with 151 additions and 72 deletions
|
@ -1626,56 +1626,66 @@ 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",
|
||||
"id",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"status",
|
||||
"rejection_reason",
|
||||
"rejection_reason_email",
|
||||
"action_needed_reason",
|
||||
"action_needed_reason_email",
|
||||
"federal_agency",
|
||||
"portfolio",
|
||||
"sub_organization",
|
||||
"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",
|
||||
'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',
|
||||
'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)
|
||||
|
@ -1688,25 +1698,37 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
readonly_fields = self.admin.get_readonly_fields(request)
|
||||
|
||||
expected_fields = [
|
||||
"other_contacts",
|
||||
"current_websites",
|
||||
"alternative_domains",
|
||||
"is_election_board",
|
||||
"status_history",
|
||||
"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'
|
||||
]
|
||||
|
||||
self.assertEqual(readonly_fields, expected_fields)
|
||||
|
||||
def test_readonly_fields_for_superuser(self):
|
||||
|
@ -1722,6 +1744,17 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
"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"
|
||||
]
|
||||
|
||||
self.assertEqual(readonly_fields, expected_fields)
|
||||
|
@ -2129,6 +2162,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
|||
response_content = "".join(response.content.decode().split())
|
||||
|
||||
# Check if response contains expected_html
|
||||
print(response.content.decode("utf-8"))
|
||||
self.assertIn(expected_html, response_content)
|
||||
|
||||
@less_console_noise_decorator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue