def METHOD_NAME(self, cli):
    user = factories.User()
    call_action(u"api_token_create", user=user[u"id"], name=u"first token")
    tid = model.Session.query(model.ApiToken).first().id
    # tid must be prefixed by --. When it starts with a hyphen it treated
    # as a flag otherwise.
    args = f'user token revoke -- "{tid}"'
    result = cli.invoke(ckan, args)
    assert not result.exit_code, result.output
    assert u"API Token has been revoked" in result.output
    result = cli.invoke(ckan, args)
    assert result.exit_code == 1
    assert u"API Token not found" in result.output