Remove the code to handle optional address placeholders

Optional address placeholders aren’t a thing for one-off letters any
more, so we can tidy up the code a bit by removing the parts of the flow
that are accounting for them.
This commit is contained in:
Chris Hill-Scott
2020-04-09 15:36:13 +01:00
parent 53918f8d9f
commit 6c7e6fa64e
4 changed files with 3 additions and 11 deletions

View File

@@ -9,11 +9,11 @@ def test_form_class_not_mutated(app_):
method='POST',
data={'placeholder_value': ''}
):
form1 = get_placeholder_form_instance('name', {}, 'sms', optional_placeholder=False)
form2 = get_placeholder_form_instance('city', {}, 'sms', optional_placeholder=True)
form1 = get_placeholder_form_instance('name', {}, 'sms')
form2 = get_placeholder_form_instance('city', {}, 'sms')
assert not form1.validate_on_submit()
assert form2.validate_on_submit()
assert not form2.validate_on_submit()
assert str(form1.placeholder_value.label) == '<label for="placeholder_value">name</label>'
assert str(form2.placeholder_value.label) == '<label for="placeholder_value">city</label>'