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:
Katie Smith
2020-11-30 16:36:38 +00:00
parent 0cae383294
commit 4e96f82c67
3 changed files with 7 additions and 5 deletions

View File

@@ -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(