mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-05-05 04:33:50 +00:00
17 lines
473 B
Python
17 lines
473 B
Python
from ahriman.models.dependencies import Dependencies
|
|
|
|
|
|
def test_post_init() -> None:
|
|
"""
|
|
must remove empty leaves
|
|
"""
|
|
assert Dependencies({"path": ["package"], "empty": []}) == Dependencies({"path": ["package"]})
|
|
|
|
|
|
def test_from_json_view() -> None:
|
|
"""
|
|
must construct and serialize dependencies to json
|
|
"""
|
|
dependencies = Dependencies({"/usr/bin/python3": ["python"]})
|
|
assert Dependencies.from_json(dependencies.view()) == dependencies
|