mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-05 23:09:32 +01:00
17 lines
460 B
Python
17 lines
460 B
Python
from dvc.cli import parse_args
|
|
from dvc.command.imp_url import CmdImportUrl
|
|
|
|
|
|
def test_import_url(mocker, dvc_repo):
|
|
cli_args = parse_args(
|
|
["import-url", "src", "out", "--resume", "--file", "file"]
|
|
)
|
|
assert cli_args.func == CmdImportUrl
|
|
|
|
cmd = cli_args.func(cli_args)
|
|
m = mocker.patch.object(cmd.repo, "imp_url", autospec=True)
|
|
|
|
assert cmd.run() == 0
|
|
|
|
m.assert_called_once_with("src", out="out", resume=True, fname="file")
|