diff --git a/src/antares_web_installer/app.py b/src/antares_web_installer/app.py index 742b268..8a64276 100644 --- a/src/antares_web_installer/app.py +++ b/src/antares_web_installer/app.py @@ -94,7 +94,7 @@ def install_files(self): else: # copy all files from package - copytree(self.source_dir, self.target_dir) + copytree(self.source_dir, self.target_dir, dirs_exist_ok=True) def copy_files(self): """ diff --git a/tests/integration/test_app.py b/tests/integration/test_app.py index 7d74741..1dbcf69 100644 --- a/tests/integration/test_app.py +++ b/tests/integration/test_app.py @@ -69,8 +69,8 @@ def test_run__empty_target( - The server is correctly started """ # Patch the `get_desktop` function according to the current platform - platform = {"nt": "windows", "posix": "linux", "darwin": "darwin"}[os.name] - monkeypatch.setattr(f"pyshortcuts.{platform}.get_desktop", lambda: desktop_dir) + platform = {"nt": "_win32_shell", "posix": "_linux_shell"}[os.name] + monkeypatch.setattr(f"antares_web_installer.shortcuts.{platform}.get_desktop", lambda: desktop_dir) # Run the application app = App(source_dir=downloaded_dir, target_dir=program_dir, shortcut=True, launch=True)