def test_download_rejects_relative_urls(monkeypatch):
    """Test that we can't tell spacy download to get an arbitrary model by using a
    relative path in the filename"""

    monkeypatch.setattr(download_module, "run_command", lambda cmd: None)

    # Check that normal download works
    download_module.download("en_core_web_sm-3.7.1", direct=True)
    with pytest.raises(SystemExit):
        download_module.download("../en_core_web_sm-3.7.1", direct=True)
Test that we can't tell spacy download to get an arbitrary model by using a
    relative path in the filename
spacy/tests/test_cli.py