diff --git a/tests/test_downloader.py b/tests/test_downloader.py index caa015b..f7eb007 100644 --- a/tests/test_downloader.py +++ b/tests/test_downloader.py @@ -156,7 +156,7 @@ def test_failed_download_database(self, download_database_mock): class TestRenameFile(TestCase): def setUp(self) -> None: - Path('/__tmp__').mkdir(exist_ok=True) + Path('__tmp__').mkdir(exist_ok=True) return super().setUp() def tearDown(self): @@ -176,13 +176,13 @@ def test_file_not_exist(self): rename_file(filepath, new_filename) def test_path_not_file(self): - filepath = '/tmp' + filepath = '/__tmp__' new_filename = 'new_test_file.xyz' with self.assertRaises(ValueError, msg="Expected ValueError Exception to be raised when path is not a file"): rename_file(filepath, new_filename) def test_rename_file(self): - filepath = '/tmp/test_file.xyz' + filepath = '/__tmp__/test_file.xyz' new_filename = 'new_test_file.xyz' new_filepath = Path(filepath).parent / new_filename Path(filepath).touch() @@ -191,7 +191,7 @@ def test_rename_file(self): self.assertTrue(result.exists(), msg="The renamed file should exist.") def test_failed_rename_file(self): - filepath = '/tmp/test_file.xyz' + filepath = '/__tmp__/test_file.xyz' new_filename = 'new_test_file.xyz' new_filepath = Path(filepath).parent / new_filename Path(filepath).touch()