def METHOD_NAME(redirect_enabled, redirect_endpoint):
    local_store = LocalStore(
        {
            "channels_dir": "channels",
            "redirect_enabled": redirect_enabled,
            "redirect_endpoint": redirect_endpoint,
        }
    )
    url = local_store.url("mychannel", "linux-64/foo.tar.bz2")
    if redirect_enabled:
        assert url == f"{redirect_endpoint}/channels/mychannel/linux-64/foo.tar.bz2"
    else:
        assert url == os.path.abspath("channels/mychannel/linux-64/foo.tar.bz2")