Download the latest asset from Github
This commit is contained in:
parent
c32449e465
commit
b56d8e72ca
11 changed files with 283 additions and 2 deletions
22
tests/software_repo_test.py
Normal file
22
tests/software_repo_test.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
from pathlib import Path
|
||||
|
||||
|
||||
def test_get_latest_version(freetube_repo):
|
||||
version = freetube_repo.get_latest_version()
|
||||
|
||||
assert version == "0.23.2"
|
||||
|
||||
|
||||
def test_latest_amd_64_deb_asset(freetube_repo):
|
||||
asset_name = freetube_repo.get_latest_asset_id()
|
||||
|
||||
assert asset_name == 231868075
|
||||
|
||||
|
||||
def test_download_latest_asset(freetube_repo):
|
||||
asset_bytes = freetube_repo.download_latest_asset()
|
||||
|
||||
assert (
|
||||
asset_bytes
|
||||
== Path("/home/stan/Téléchargements/freetube_0.23.2_amd64.deb").read_bytes()
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue