Added optional missing_ok to config_delete
This commit is contained in:
@@ -51,3 +51,16 @@ def test_config_set(key: str, path: List[str], value: Any, location_config: Path
|
||||
def test_config_delete(key: str, path: List[str], location_config: Path):
|
||||
sync.config_delete(key, *path, config_file=location_config)
|
||||
assert key not in sync.config_get(*path, config_file=location_config)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"key, path",
|
||||
[
|
||||
("bot_lol", ["bot"]),
|
||||
],
|
||||
)
|
||||
async def test_config_delete_missing(key: str, path: List[str], location_config: Path):
|
||||
assert (
|
||||
sync.config_delete(key, *path, missing_ok=True, config_file=location_config)
|
||||
is None
|
||||
)
|
||||
|
Reference in New Issue
Block a user