Consolidate callback forms and convert them to gov uk frontend

We had two identical callback form classes. One for delivery callbacks
and one for inbound sms callbacks. Since they did not differ I consolidated
them into one CallbackForm class that they both inherited from previously.

I also substituted field classes for this form with new fields
that cooperate with gov uk frontend.
This commit is contained in:
Pea Tyczynska
2020-08-03 15:10:02 +01:00
committed by Tom Byers
parent 6f1fc3d16d
commit be7d4891ae
5 changed files with 36 additions and 63 deletions

View File

@@ -512,9 +512,9 @@ def test_callback_forms_validation(
_data=data,
_expected_status=200
)
error_msgs = ' '.join(msg.text.strip() for msg in response.select(".error-message"))
error_msgs = ' '.join(msg.text.strip() for msg in response.select(".govuk-error-message"))
assert error_msgs == expected_errors
assert expected_errors in error_msgs
@pytest.mark.parametrize('bearer_token', ['', 'some-bearer-token'])