Refactor command handling

This now supports usage/help texts
This commit is contained in:
2025-05-18 17:56:53 +02:00
parent 26ef9b45d4
commit dcf0b4274c
15 changed files with 337 additions and 431 deletions

View File

@ -82,10 +82,13 @@ async def mock_backend(client_registry: ClientRegistry) -> MagicMock:
"Error, must have a client called template for this to work."
)
clients_data[name] = clients_data["template"]
template_secrets: dict[str, str] = {}
for secret_key, secret in secrets_data.items():
s_client, secret_name = secret_key
if s_client != "template":
continue
template_secrets[secret_name] = secret
for secret_name, secret in template_secrets.items():
secrets_data[(name, secret_name)] = secret
async def write_audit(*args, **kwargs):