mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-11-04 15:53:41 +00:00
bug: fix removal of the packages
It has been broken since reporter improvements, because it effectivelly 1) didn't call remove functions in database 2) used empty repository identifier for web service With those changes it also raises exception when you try to call id on empty identifier
This commit is contained in:
@ -7,10 +7,17 @@ def test_id() -> None:
|
||||
"""
|
||||
must correctly generate id
|
||||
"""
|
||||
assert RepositoryId("", "").id == ""
|
||||
assert RepositoryId("arch", "repo").id == "arch-repo"
|
||||
|
||||
|
||||
def test_id_empty() -> None:
|
||||
"""
|
||||
must raise exception on empty identifier
|
||||
"""
|
||||
with pytest.raises(ValueError):
|
||||
assert RepositoryId("", "").id
|
||||
|
||||
|
||||
def test_is_empty() -> None:
|
||||
"""
|
||||
must check if repository id is empty or not
|
||||
|
||||
Reference in New Issue
Block a user