Skip to content

Commit a620658

Browse files
committed
http/ imp tests - migrate do dir helpers
1 parent 8041d70 commit a620658

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/unit/command/test_imp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from dvc.command.imp import CmdImport
33

44

5-
def test_import(mocker, dvc_repo):
5+
def test_import(mocker, dvc):
66
cli_args = parse_args(
77
["import", "repo_url", "src", "--out", "out", "--rev", "version"]
88
)

tests/unit/command/test_imp_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from dvc.exceptions import DvcException
66

77

8-
def test_import_url(mocker, dvc_repo):
8+
def test_import_url(mocker, dvc):
99
cli_args = parse_args(["import-url", "src", "out", "--file", "file"])
1010
assert cli_args.func == CmdImportUrl
1111

@@ -17,7 +17,7 @@ def test_import_url(mocker, dvc_repo):
1717
m.assert_called_once_with("src", out="out", fname="file")
1818

1919

20-
def test_failed_import_url(mocker, caplog, dvc_repo):
20+
def test_failed_import_url(mocker, caplog, dvc):
2121
cli_args = parse_args(["import-url", "http://somesite.com/file_name"])
2222
assert cli_args.func == CmdImportUrl
2323

tests/unit/remote/test_http.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
from tests.utils.httpd import StaticFileServer
88

99

10-
def test_no_traverse_compatibility(dvc_repo):
10+
def test_no_traverse_compatibility(dvc):
1111
config = {
1212
"url": "http://example.com/",
1313
"path_info": "file.html",
1414
"no_traverse": False,
1515
}
1616

1717
with pytest.raises(ConfigError):
18-
RemoteHTTP(dvc_repo, config)
18+
RemoteHTTP(dvc, config)
1919

2020

21-
def test_download_fails_on_error_code(dvc_repo):
21+
def test_download_fails_on_error_code(dvc):
2222
with StaticFileServer() as httpd:
2323
url = "http://localhost:{}/".format(httpd.server_port)
2424
config = {"url": url}
2525

26-
remote = RemoteHTTP(dvc_repo, config)
26+
remote = RemoteHTTP(dvc, config)
2727

2828
with pytest.raises(HTTPError):
2929
remote._download(URLInfo(url) / "missing.txt", "missing.txt")

0 commit comments

Comments
 (0)