def METHOD_NAME(
    client,
    mocker,
    api_user_pending,
    mock_get_user_pending,
    mock_send_verify_code,
    mock_check_verify_code,
):
    token_data = {"user_id": api_user_pending["id"], "secret_code": "UNUSED"}
    mocker.patch("app.main.views.verify.check_token", return_value=json.dumps(token_data))
    with client.session_transaction() as session:
        session["user_details"] = {
            "email_address": api_user_pending["email_address"],
            "id": api_user_pending["id"],
        }
    response = client.get(url_for("main.verify_email", token="notreal"))
    assert response.status_code == 302
    assert response.location == url_for("main.verify")
    assert not mock_check_verify_code.called
    mock_send_verify_code.assert_called_once_with(api_user_pending["id"], "sms", api_user_pending["mobile_number"])
    with client.session_transaction() as session:
        assert session["user_details"] == {
            "email": api_user_pending["email_address"],
            "id": api_user_pending["id"],
        }