Skip to content

Commit 3de80b0

Browse files
committed
chore: update tests
Signed-off-by: Ben Selwyn-Smith <[email protected]>
1 parent 9ef8b3e commit 3de80b0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/slsa_analyzer/package_registry/test_maven_central_registry.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def test_get_artifact_hash_failures(
257257
httpserver.expect_request(artifact_path + ".sha256").respond_with_data(expected_hash)
258258
httpserver.expect_request(artifact_path).respond_with_data(b"example_data_2")
259259

260-
result = maven_registry.get_artifact_hash(purl)
260+
result, _ = maven_registry.get_artifact_hash(purl)
261261

262262
assert not result
263263

@@ -282,7 +282,9 @@ def test_get_artifact_hash_success(
282282
expected_hash = hash_algorithm.hexdigest()
283283
httpserver.expect_request(artifact_path + ".sha256").respond_with_data(expected_hash)
284284
httpserver.expect_request(artifact_path).respond_with_data(b"example_data")
285+
expected_artifact_path = f"http://{httpserver.host}:{httpserver.port}{artifact_path}"
285286

286-
result = maven_registry.get_artifact_hash(purl)
287+
result, result_path = maven_registry.get_artifact_hash(purl)
287288

288289
assert result
290+
assert expected_artifact_path == result_path

0 commit comments

Comments
 (0)