Skip to content

Commit fd13f90

Browse files
committed
fix unit tests
1 parent 28f3871 commit fd13f90

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

tests/pypi/hub_builder/hub_builder_tests.bzl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,13 @@ git_dep @ git+https://git.server/repo/project@deadbeefdeadbeef
10361036
index_url = "pypi.org",
10371037
index_url_overrides = {},
10381038
netrc = None,
1039-
sources = ["simple", "plat_pkg", "pip_fallback", "some_other_pkg"],
1039+
facts = None,
1040+
sources = {
1041+
"pip_fallback": ["0.0.1"],
1042+
"plat_pkg": ["0.0.4"],
1043+
"simple": ["0.0.1"],
1044+
"some_other_pkg": ["0.0.1"],
1045+
},
10401046
),
10411047
"cache": {},
10421048
"parallel_download": False,

tests/pypi/simpleapi_download/simpleapi_download_tests.bzl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ _tests = []
2222
def _test_simple(env):
2323
calls = []
2424

25-
def read_simpleapi(ctx, url, attr, cache, get_auth, block):
25+
def read_simpleapi(ctx, index_url, distribution, attr, cache, get_auth, requested_versions, block):
2626
_ = ctx # buildifier: disable=unused-variable
27+
_ = distribution
28+
_ = requested_versions
2729
_ = attr
2830
_ = cache
2931
_ = get_auth
3032
env.expect.that_bool(block).equals(False)
33+
url = "{}/{}/".format(index_url, distribution)
3134
calls.append(url)
3235
if "foo" in url and "main" in url:
3336
return struct(
@@ -75,11 +78,14 @@ def _test_fail(env):
7578
calls = []
7679
fails = []
7780

78-
def read_simpleapi(ctx, url, attr, cache, get_auth, block):
81+
def read_simpleapi(ctx, index_url, distribution, attr, cache, get_auth, requested_versions, block):
7982
_ = ctx # buildifier: disable=unused-variable
83+
_ = distribution
84+
_ = requested_versions
8085
_ = attr
8186
_ = cache
8287
_ = get_auth
88+
url = "{}/{}/".format(index_url, distribution)
8389
env.expect.that_bool(block).equals(False)
8490
calls.append(url)
8591
if "foo" in url:

0 commit comments

Comments
 (0)