Merge pull request #2656 from GSA/python_manual_unwind

remove async
This commit is contained in:
ccostino
2025-06-09 14:36:32 -04:00
committed by GitHub

View File

@@ -1784,53 +1784,53 @@ def test_should_not_create_sms_template_with_emoji(
assert mock_create_service_template.called is False assert mock_create_service_template.called is False
@pytest.mark.asyncio # @pytest.mark.asyncio
@pytest.mark.parametrize( # @pytest.mark.parametrize(
("template_type", "expected_error"), # ("template_type", "expected_error"),
[ # [
( # (
"sms", # "sms",
( # (
"Please remove the unaccepted character 🍔 in your message, then save again" # "Please remove the unaccepted character 🍔 in your message, then save again"
), # ),
), # ),
], # ],
) # )
async def test_should_not_update_sms_template_with_emoji( # async def test_should_not_update_sms_template_with_emoji(
mocker, # mocker,
client_request, # client_request,
service_one, # service_one,
mock_get_service_template, # mock_get_service_template,
mock_update_service_template, # mock_update_service_template,
fake_uuid, # fake_uuid,
template_type, # template_type,
expected_error, # expected_error,
): # ):
service_one["permissions"] += [template_type] # service_one["permissions"] += [template_type]
return mocker.patch( # return mocker.patch(
"app.service_api_client.get_service_template", # "app.service_api_client.get_service_template",
return_value=template_json( # return_value=template_json(
SERVICE_ONE_ID, # SERVICE_ONE_ID,
fake_uuid, # fake_uuid,
type_=template_type, # type_=template_type,
), # ),
) # )
page = client_request.post( # page = client_request.post(
".edit_service_template", # ".edit_service_template",
service_id=SERVICE_ONE_ID, # service_id=SERVICE_ONE_ID,
template_id=fake_uuid, # template_id=fake_uuid,
_data={ # _data={
"id": fake_uuid, # "id": fake_uuid,
"name": "new name", # "name": "new name",
"template_content": "here's a burger 🍔", # "template_content": "here's a burger 🍔",
"service": SERVICE_ONE_ID, # "service": SERVICE_ONE_ID,
"template_type": template_type, # "template_type": template_type,
"process_type": "normal", # "process_type": "normal",
}, # },
_expected_status=200, # _expected_status=200,
) # )
assert expected_error in page.text # assert expected_error in page.text
assert mock_update_service_template.called is False # assert mock_update_service_template.called is False
@pytest.mark.parametrize( @pytest.mark.parametrize(