def METHOD_NAME(client, draft):
    assert draft.codelist.versions.count() > 1
    client.force_login(draft.author)
    rsp = client.post(draft.get_builder_draft_url(), {"action": "discard"}, follow=True)
    assert rsp.status_code == 200
    # As more than one version existed, the codelist still exists; redirects to the codelist's
    # absolute url, which in turn redirects to the latest visible version
    assert rsp.redirect_chain[-2][0] == draft.codelist.get_absolute_url()
    assert (
        rsp.redirect_chain[-1][0]
        == draft.codelist.latest_visible_version(draft.author).get_absolute_url()
    )