mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-26 05:11:06 -05:00
Remove POST param from agreement test
This test sent an empty string to represent the 'who' field not having a value. This is represented by a group of radios in the page. In browsers, radios that aren't selected result in that field not being included in the HTTP parameters. This change makes the test match that. The expected validation message is also changed to the one you see in a browser. Turns out [the WTForms DataRequired validator](https://wtforms.readthedocs.io/en/stable/validators.html#wtforms.validators.DataRequired) produces a different error message for an empty string vs the value being missing ("This field is required." vs "Not a valid choice").
This commit is contained in:
@@ -272,12 +272,11 @@ def test_accept_agreement_page_populates(
|
||||
(
|
||||
{
|
||||
'version': '',
|
||||
'who': '',
|
||||
'on_behalf_of_name': '',
|
||||
'on_behalf_of_email': '',
|
||||
},
|
||||
[
|
||||
'This field is required.',
|
||||
'Not a valid choice',
|
||||
'Must be a number',
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user