8000 swap invalid urls that are used in testing. (takes care of deprecatio… · jku/python-tuf@6318760 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6318760

Browse files
committed
swap invalid urls that are used in testing. (takes care of deprecation warning in theupdateframework#2776)
Signed-off-by: NicholasTanz <nicholastanzillo@gmail.com>
1 parent d67f126 commit 6318760

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test_fetcher_ng.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def test_fetch_in_chunks(self) -> None:
9494
# Incorrect URL parsing
9595
def test_url_parsing(self) -> None:
9696
with self.assertRaises(exceptions.DownloadError):
97-
self.fetcher.fetch("missing-scheme-and-hostname-in-url")
97+
self.fetcher.fetch("http://invalid/")
9898

9999
# File not found error
100100
def test_http_error(self) -> None:

tests/test_updater_ng.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def test_persist_metadata_fails(
316316
def test_invalid_target_base_url(self) -> None:
317317
info = TargetFile(1, {"sha256": ""}, "targetpath")
318318
with self.assertRaises(exceptions.DownloadError):
319-
self.updater.download_target(info, target_base_url="invalid_url")
319+
self.updater.download_target(info, target_base_url="http://invalid/")
320320

321321
def test_non_existing_target_file(self) -> None:
322322
info = TargetFile(1, {"sha256": ""}, "/non_existing_file.txt")

0 commit comments

Comments
 (0)
0