Prepare tests for hfh 0.14
Related to the coming release of `huggingface_hub==0.14.0`. It will break some internal tests. The PR fixes these tests. The plan is to merge this PR right after the new release is made. This will not impact `transformers`'s end users. However, PR contributors will have to rebase their branch once this one is merged.

See related [discussion](https://huggingface.slack.com/archives/C02V5EA0A95/p1682337463368609?thread_ts=1681994202.635609&cid=C02V5EA0A95) (private slack).

cc @sgugger @ydshieh 
_The documentation is not available anymore as the PR was closed or merged._