mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-08-27 03:49:57 +00:00
* add models tests (#1) also replace single quote to double one to confort PEP docstring + move _check_output to class properties to make it available for mocking * alpm tests implementation * try to replace os with pathlib * update tests for pathlib * fix includes glob and trim version from dependencies * build_tools package tests * repository component tests * add sign tests * complete status tests * handle exceptions in actual_version calls * complete core tests * move configuration to root conftest * application tests * complete application tests * change copyright to more generic one * base web tests * complete web tests * complete testkit also add argument parsers test
This commit is contained in:
17
tests/ahriman/models/test_package_desciption.py
Normal file
17
tests/ahriman/models/test_package_desciption.py
Normal file
@ -0,0 +1,17 @@
|
||||
from ahriman.models.package_desciption import PackageDescription
|
||||
|
||||
|
||||
def test_filepath(package_description_ahriman: PackageDescription) -> None:
|
||||
"""
|
||||
must generate correct filepath if set
|
||||
"""
|
||||
assert package_description_ahriman.filepath is not None
|
||||
assert package_description_ahriman.filepath.name == package_description_ahriman.filename
|
||||
|
||||
|
||||
def test_filepath_empty(package_description_ahriman: PackageDescription) -> None:
|
||||
"""
|
||||
must return None for missing filename
|
||||
"""
|
||||
package_description_ahriman.filename = None
|
||||
assert package_description_ahriman.filepath is None
|
Reference in New Issue
Block a user