get: implement --show-url to display only url/path to remote

This commit is contained in:
Saugat Pachhai
2020-01-16 19:28:14 +05:45
parent 1f1fb03138
commit 4509f82bc3
3 changed files with 53 additions and 0 deletions
+14
View File
@@ -14,3 +14,17 @@ def test_get(mocker):
assert cmd.run() == 0
m.assert_called_once_with("repo_url", path="src", out="out", rev="version")
def test_get_url(mocker):
cli_args = parse_args(
["get", "repo_url", "src", "--rev", "version", "--show-url"]
)
assert cli_args.func == CmdGet
cmd = cli_args.func(cli_args)
m = mocker.patch("dvc.api.get_url")
assert cmd.run() == 0
m.assert_called_once_with("src", repo="repo_url", rev="version")