mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-08 19:23:38 +00:00
feat: implement local reporter mode (#126)
* implement local reporter mode * simplify watcher class * review changes * do not update unknown status * allow empty key patches via api * fix some pylint warnings in tests
This commit is contained in:
@@ -51,6 +51,14 @@ def test_from_env() -> None:
|
||||
assert PkgbuildPatch.from_env("KEY") == PkgbuildPatch("KEY", "")
|
||||
|
||||
|
||||
def test_from_json_view() -> None:
|
||||
"""
|
||||
must correctly serialize to json
|
||||
"""
|
||||
patch = PkgbuildPatch("key", "value")
|
||||
assert PkgbuildPatch.from_json(patch.view()) == patch
|
||||
|
||||
|
||||
def test_parse() -> None:
|
||||
"""
|
||||
must parse string correctly
|
||||
@@ -124,13 +132,6 @@ def test_serialize_list() -> None:
|
||||
assert PkgbuildPatch("key", ["val'ue", "val\"ue2"]).serialize() == """key=('val'"'"'ue' 'val"ue2')"""
|
||||
|
||||
|
||||
def test_view() -> None:
|
||||
"""
|
||||
must correctly serialize to json
|
||||
"""
|
||||
assert PkgbuildPatch("key", "value").view() == {"key": "key", "value": "value"}
|
||||
|
||||
|
||||
def test_write(mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must write serialized value to the file
|
||||
|
||||
Reference in New Issue
Block a user