mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 13:19:49 -04:00
Fix client_request.post in test
The `post` method of the `client_request` fixture has an argument called `_data`. There were a few places where we had used an argument of `data` instead by mistake.
This commit is contained in:
@@ -294,7 +294,7 @@ def test_should_return_form_errors_when_service_name_is_empty(
|
||||
):
|
||||
page = client_request.post(
|
||||
'main.add_service',
|
||||
data={},
|
||||
_data={},
|
||||
_expected_status=200,
|
||||
)
|
||||
assert 'Cannot be empty' in page.text
|
||||
@@ -306,10 +306,12 @@ def test_add_service_fails_if_service_name_has_less_than_2_alphanumeric_characte
|
||||
):
|
||||
page = client_request.post(
|
||||
'main.add_service',
|
||||
data={"name": "."},
|
||||
_data={"name": "."},
|
||||
_expected_status=200,
|
||||
)
|
||||
assert page.find("span", {"class": "govuk-error-message"})
|
||||
|
||||
error_message = page.find("span", {"class": "govuk-error-message"}).text
|
||||
assert 'Must include at least two alphanumeric characters' in error_message
|
||||
|
||||
|
||||
def test_should_return_form_errors_with_duplicate_service_name_regardless_of_case(
|
||||
|
||||
Reference in New Issue
Block a user