Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions aiohasupervisor/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,9 @@ async def addon_stats(self, addon: str) -> AddonsStats:
result = await self._client.get(f"addons/{addon}/stats")
return AddonsStats.from_dict(result.data)

# Aliases for clarity
set_addon_options = addon_options
write_addon_stdin = addon_stdin
set_addon_security = addon_security

# Omitted for now - Log endpoints
7 changes: 4 additions & 3 deletions tests/test_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def test_addons_options(
"""Test addon options API."""
responses.post(f"{SUPERVISOR_URL}/addons/core_ssh/options", status=200)
assert (
await supervisor_client.addons.addon_options(
await supervisor_client.addons.set_addon_options(
"core_ssh",
AddonsOptions(
config=None,
Expand Down Expand Up @@ -195,7 +195,8 @@ async def test_addons_stdin(
"""Test addon stdin API."""
responses.post(f"{SUPERVISOR_URL}/addons/core_ssh/stdin", status=200)
assert (
await supervisor_client.addons.addon_stdin("core_ssh", b"hello world") is None
await supervisor_client.addons.write_addon_stdin("core_ssh", b"hello world")
is None
)
assert len(responses.requests) == 1
assert (
Expand All @@ -212,7 +213,7 @@ async def test_addons_security(
"""Test addon security API."""
responses.post(f"{SUPERVISOR_URL}/addons/core_ssh/security", status=200)
assert (
await supervisor_client.addons.addon_security(
await supervisor_client.addons.set_addon_security(
"core_ssh", AddonsSecurityOptions(protected=True)
)
is None
Expand Down
Loading