mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -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(
|
||||
|
||||
@@ -3480,7 +3480,7 @@ def test_should_send_branding_and_organisations_to_preview(
|
||||
client_request.login(platform_admin_user)
|
||||
client_request.post(
|
||||
endpoint,
|
||||
data={
|
||||
_data={
|
||||
'branding_type': 'org',
|
||||
'branding_style': '1'
|
||||
},
|
||||
|
||||
@@ -94,7 +94,7 @@ def test_should_render_change_email_continue_after_authenticate_email(
|
||||
session['new-email'] = 'new_notify@notify.gov.uk'
|
||||
page = client_request.post(
|
||||
'main.user_profile_email_authenticate',
|
||||
data={'password': '12345'},
|
||||
_data={'password': '12345'},
|
||||
_expected_status=200,
|
||||
)
|
||||
assert 'Click the link in the email to confirm the change to your email address.' in page.text
|
||||
|
||||
Reference in New Issue
Block a user