Skip to content

Commit 0708fb4

Browse files
committed
Reverted URL construction back to f-strings
Signed-off-by: Ari <aribasch@umich.edu>
1 parent d867deb commit 0708fb4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_fetcher_ng.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def setUpClass(cls) -> None:
5050
f"{str(cls.server_process_handler.port)}"
5151
)
5252
target_filename = os.path.basename(cls.target_file.name)
53-
cls.url = os.path.join(cls.url_prefix, target_filename)
53+
cls.url = f"{cls.url_prefix}/{target_filename}"
5454

5555
@classmethod
5656
def tearDownClass(cls) -> None:
@@ -102,7 +102,7 @@ def test_url_parsing(self) -> None:
102102
# File not found error
103103
def test_http_error(self) -> None:
104104
with self.assertRaises(exceptions.DownloadHTTPError) as cm:
105-
self.url = os.path.join(self.url_prefix, "non-existing-path")
105+
self.url = f"{self.url_prefix}/non-existing-path"
106106
self.fetcher.fetch(self.url)
107107
self.assertEqual(cm.exception.status_code, 404)
108108

tests/test_updater_ng.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def setUp(self) -> None:
104104
+ repository_basepath.replace("\\", "/")
105105
)
106106

107-
self.metadata_url = os.path.join(url_prefix, "metadata", "")
108-
self.targets_url = os.path.join(url_prefix, "targets", "")
107+
self.metadata_url = f"{url_prefix}/metadata/"
108+
self.targets_url = f"{url_prefix}/targets/"
109109
self.dl_dir = tempfile.mkdtemp(dir=self.tmp_test_dir)
110110
# Creating a repository instance. The test cases will use this client
111111
# updater to refresh metadata, fetch target files, etc.

0 commit comments

Comments
 (0)