def test_retrive_from_url_gitlab_subdir(urlretrive, abs_from_url): abs_from_url.return_value = fake_path("/test/test", "test") make_get.retrive_from_url("gl:fholmer/make", "", "tests/make/make_project") urlretrive.assert_called_once_with( "https://gitlab.com/fholmer/make/-/archive/master/make-master.zip?path=tests%2Fmake%2Fmake_project", "/test/test", )
def test_retrive_from_url(urlretrive): make_get.retrive_from_url("http://src", "dst", "") urlretrive.assert_called_once_with("http://src", str(pathlib.Path("dst").absolute()))
def test_retrive_from_url_github(urlretrive, abs_from_url): abs_from_url.return_value = fake_path("/test/test", "test") make_get.retrive_from_url("gh:fholmer/make", "", "") urlretrive.assert_called_once_with( "https://github.com/fholmer/make/archive/master.zip", "/test/test")
def test_retrive_from_url_abort(urlretrive): with pytest.raises(errors.Abort): make_get.retrive_from_url("", "dst", "")