mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-04 23:09:44 +01:00
* update: --recursive flag * refactor: applied isort changes to dvc/repo/update.py * update: removed default values, check for str * update: fixed code climate cognitive complexity issues
18 lines
458 B
Python
18 lines
458 B
Python
from dvc.cli import parse_args
|
|
from dvc.command.update import CmdUpdate
|
|
|
|
|
|
def test_update(dvc, mocker):
|
|
cli_args = parse_args(
|
|
["update", "target1", "target2", "--rev", "REV", "--recursive"]
|
|
)
|
|
assert cli_args.func == CmdUpdate
|
|
cmd = cli_args.func(cli_args)
|
|
m = mocker.patch("dvc.repo.Repo.update")
|
|
|
|
assert cmd.run() == 0
|
|
|
|
m.assert_called_once_with(
|
|
targets=["target1", "target2"], rev="REV", recursive=True,
|
|
)
|