save a file to alocal folder and make it executable

This commit is contained in:
Stanislas Jouffroy 2025-03-04 00:06:09 +01:00
parent e54626d971
commit 230cf99f06
8 changed files with 122 additions and 21 deletions

13
tests/main_test.py Normal file
View file

@ -0,0 +1,13 @@
from pathlib import Path
from majordome import main
def test_download_and_save_latest_asset(freetube_url, freetube_amd64_deb_mnemonic):
destination = Path(__file__).parent / "tmp"
main.download_latest(freetube_url, freetube_amd64_deb_mnemonic, destination)
files = list(destination.glob("*"))
assert len(files) == 1
assert files[0].filename == "freetube_0.23.2_amd64.deb"