from gpu_rent.huggingface import hf_resolve_url, is_huggingface_url def test_is_huggingface_url(): assert is_huggingface_url( "https://huggingface.co/org/model/resolve/main/a.gguf" ) assert not is_huggingface_url("https://civitai.red/models/1") def test_hf_resolve_url(): assert ( hf_resolve_url("bartowski/foo", "bar.gguf") == "https://huggingface.co/bartowski/foo/resolve/main/bar.gguf" )