def METHOD_NAME(client, draft, term, valid, slug):
    client.force_login(draft.author)
    rsp = client.post(
        draft.get_builder_new_search_url(),
        {"search": term},
    )
    assert rsp.status_code == 302
    if valid:
        assert rsp.url == draft.get_builder_search_url(slug)
    else:
        assert rsp.url == draft.get_builder_draft_url()