mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-11-13 03:53:41 +00:00
Compare commits
2 Commits
a28589ec74
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6443e02352 | |||
| 999ad39d6f |
@ -57,7 +57,7 @@ class ConfigurationMultiDict(dict[str, Any]):
|
||||
OptionError: if the key already exists in the dictionary, but not a single value list or a string
|
||||
"""
|
||||
match self.get(key):
|
||||
case [current_value] | str(current_value):
|
||||
case [current_value] | (str() as current_value):
|
||||
value = f"{current_value} {value}"
|
||||
case None:
|
||||
pass
|
||||
|
||||
@ -47,6 +47,7 @@ class LogsRotationTrigger(Trigger):
|
||||
},
|
||||
},
|
||||
}
|
||||
REQUIRES_REPOSITORY = True
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
|
||||
@ -336,6 +336,7 @@ class ReportTrigger(Trigger):
|
||||
},
|
||||
},
|
||||
}
|
||||
REQUIRES_REPOSITORY = True
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
|
||||
@ -103,6 +103,7 @@ class KeyringTrigger(Trigger):
|
||||
},
|
||||
},
|
||||
}
|
||||
REQUIRES_REPOSITORY = True
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
|
||||
@ -90,6 +90,7 @@ class MirrorlistTrigger(Trigger):
|
||||
},
|
||||
},
|
||||
}
|
||||
REQUIRES_REPOSITORY = True
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
|
||||
@ -160,6 +160,7 @@ class UploadTrigger(Trigger):
|
||||
},
|
||||
},
|
||||
}
|
||||
REQUIRES_REPOSITORY = True
|
||||
|
||||
def __init__(self, repository_id: RepositoryId, configuration: Configuration) -> None:
|
||||
"""
|
||||
|
||||
@ -7,6 +7,13 @@ from ahriman.core.status import Client
|
||||
from ahriman.models.result import Result
|
||||
|
||||
|
||||
def test_requires_repository() -> None:
|
||||
"""
|
||||
must require repository identifier to be set to start
|
||||
"""
|
||||
assert LogsRotationTrigger.REQUIRES_REPOSITORY
|
||||
|
||||
|
||||
def test_configuration_sections(configuration: Configuration) -> None:
|
||||
"""
|
||||
must correctly parse target list
|
||||
|
||||
@ -5,6 +5,13 @@ from ahriman.core.report import ReportTrigger
|
||||
from ahriman.models.result import Result
|
||||
|
||||
|
||||
def test_requires_repository() -> None:
|
||||
"""
|
||||
must require repository identifier to be set to start
|
||||
"""
|
||||
assert ReportTrigger.REQUIRES_REPOSITORY
|
||||
|
||||
|
||||
def test_configuration_sections(configuration: Configuration) -> None:
|
||||
"""
|
||||
must correctly parse target list
|
||||
|
||||
@ -7,6 +7,13 @@ from ahriman.core.sign.gpg import GPG
|
||||
from ahriman.core.support import KeyringTrigger
|
||||
|
||||
|
||||
def test_requires_repository() -> None:
|
||||
"""
|
||||
must require repository identifier to be set to start
|
||||
"""
|
||||
assert KeyringTrigger.REQUIRES_REPOSITORY
|
||||
|
||||
|
||||
def test_configuration_sections(configuration: Configuration) -> None:
|
||||
"""
|
||||
must correctly parse target list
|
||||
|
||||
@ -4,6 +4,13 @@ from ahriman.core.configuration import Configuration
|
||||
from ahriman.core.support import MirrorlistTrigger
|
||||
|
||||
|
||||
def test_requires_repository() -> None:
|
||||
"""
|
||||
must require repository identifier to be set to start
|
||||
"""
|
||||
assert MirrorlistTrigger.REQUIRES_REPOSITORY
|
||||
|
||||
|
||||
def test_configuration_sections(configuration: Configuration) -> None:
|
||||
"""
|
||||
must correctly parse target list
|
||||
|
||||
@ -5,6 +5,13 @@ from ahriman.core.upload import UploadTrigger
|
||||
from ahriman.models.result import Result
|
||||
|
||||
|
||||
def test_requires_repository() -> None:
|
||||
"""
|
||||
must require repository identifier to be set to start
|
||||
"""
|
||||
assert UploadTrigger.REQUIRES_REPOSITORY
|
||||
|
||||
|
||||
def test_configuration_sections(configuration: Configuration) -> None:
|
||||
"""
|
||||
must correctly parse target list
|
||||
|
||||
Reference in New Issue
Block a user