mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-05 15:28:27 +01:00
* erepo: dvc: implement `update` for imports from ext repos Fixes #1774 Fixes #2139 Fixes #2201 Signed-off-by: Ruslan Kuprieiev <[email protected]> * deps: repo: make private Signed-off-by: Ruslan Kuprieiev <[email protected]> * update: only support repo imports Signed-off-by: Ruslan Kuprieiev <[email protected]>
16 lines
426 B
Python
16 lines
426 B
Python
from dvc.cli import parse_args
|
|
from dvc.command.update import CmdUpdate
|
|
|
|
|
|
def test_update(mocker):
|
|
targets = ["target1", "target2", "target3"]
|
|
cli_args = parse_args(["update"] + targets)
|
|
assert cli_args.func == CmdUpdate
|
|
cmd = cli_args.func(cli_args)
|
|
m = mocker.patch("dvc.repo.Repo.update")
|
|
|
|
assert cmd.run() == 0
|
|
|
|
calls = [mocker.call(target) for target in targets]
|
|
m.assert_has_calls(calls)
|