def METHOD_NAME():
    def run_playbook(playbook, context, *args, unknown_args=None, **kw):
        eq(unknown_args, [
            "-e", "code_version=def456",
            "-e", "keep_until=2020-01-03_03.04",
            "--tags=private_release",
        ])
        eq(context.environment.release_name, "2020-01-02_03.04")
        eq(kw.get("limit"), "pillowtop[0]")
        log.append(playbook)
        return 0
    def run_command(env_name, cmd, *args, **kw):
        assert not kw, kw
        log.append(" ".join((cmd,) + args))
        return 0
    log = []
    with (
        patch.object(preindex_views, "check_branch"),
        patch.object(preindex_views, "commcare_cloud", run_command),
        patch.object(preindex_views, "datetime", fakedatetime),
        patch.object(commcare, "run_ansible_playbook", run_playbook),
        patch.object(commcare, "datetime", fakedatetime),
    ):
        _deploy_commcare(cmd=("preindex-views",))
    eq(log, [
        "deploy_hq.yml",
        "django-manage preindex_everything --server=pillowtop[0] --release=2020-01-02_03.04 --tmux --mail",
    ])