Add form test and fix linting/test merge errors

This commit is contained in:
Neil Martinsen-Burrell 2023-01-30 14:54:09 -06:00
parent 59c67a70d2
commit d4ac5d92f1
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
4 changed files with 27 additions and 40 deletions

View file

@ -11,6 +11,7 @@ from registrar.forms.application_wizard import (
OtherContactsForm,
SecurityEmailForm,
RequirementsForm,
TribalGovernmentForm,
)
@ -150,3 +151,15 @@ class TestFormValidation(TestCase):
" registering and operating .gov domains."
],
)
def test_tribal_government_unrecognized(self):
"""Not state or federally recognized is an error."""
form = TribalGovernmentForm(
data={"state_recognized": False, "federally_recognized": False}
)
self.assertTrue(
any(
"Please email registrar@dotgov.gov" in error
for error in form.non_field_errors()
)
)