mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Spelling - runtime and test changes (#82868)
This commit is contained in:
parent
42701a6872
commit
d72802cfb0
@ -5,7 +5,7 @@ DOMAIN = "nzbget"
|
|||||||
ATTR_SPEED = "speed"
|
ATTR_SPEED = "speed"
|
||||||
|
|
||||||
# Data
|
# Data
|
||||||
DATA_COORDINATOR = "corrdinator"
|
DATA_COORDINATOR = "coordinator"
|
||||||
DATA_UNDO_UPDATE_LISTENER = "undo_update_listener"
|
DATA_UNDO_UPDATE_LISTENER = "undo_update_listener"
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
|
@ -18,13 +18,13 @@ async def test_pause_job(hass: HomeAssistant):
|
|||||||
"""Test the pause job button."""
|
"""Test the pause job button."""
|
||||||
await init_integration(hass, BUTTON_DOMAIN)
|
await init_integration(hass, BUTTON_DOMAIN)
|
||||||
|
|
||||||
corrdinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][
|
coordinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][
|
||||||
"coordinator"
|
"coordinator"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Test pausing the printer when it is printing
|
# Test pausing the printer when it is printing
|
||||||
with patch("pyoctoprintapi.OctoprintClient.pause_job") as pause_command:
|
with patch("pyoctoprintapi.OctoprintClient.pause_job") as pause_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{"state": {"flags": {"printing": True}}, "temperature": []}
|
{"state": {"flags": {"printing": True}}, "temperature": []}
|
||||||
)
|
)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
@ -40,7 +40,7 @@ async def test_pause_job(hass: HomeAssistant):
|
|||||||
|
|
||||||
# Test pausing the printer when it is paused
|
# Test pausing the printer when it is paused
|
||||||
with patch("pyoctoprintapi.OctoprintClient.pause_job") as pause_command:
|
with patch("pyoctoprintapi.OctoprintClient.pause_job") as pause_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{"state": {"flags": {"printing": False, "paused": True}}, "temperature": []}
|
{"state": {"flags": {"printing": False, "paused": True}}, "temperature": []}
|
||||||
)
|
)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
@ -58,7 +58,7 @@ async def test_pause_job(hass: HomeAssistant):
|
|||||||
with patch(
|
with patch(
|
||||||
"pyoctoprintapi.OctoprintClient.pause_job"
|
"pyoctoprintapi.OctoprintClient.pause_job"
|
||||||
) as pause_command, pytest.raises(InvalidPrinterState):
|
) as pause_command, pytest.raises(InvalidPrinterState):
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{
|
{
|
||||||
"state": {"flags": {"printing": False, "paused": False}},
|
"state": {"flags": {"printing": False, "paused": False}},
|
||||||
"temperature": [],
|
"temperature": [],
|
||||||
@ -78,13 +78,13 @@ async def test_resume_job(hass: HomeAssistant):
|
|||||||
"""Test the resume job button."""
|
"""Test the resume job button."""
|
||||||
await init_integration(hass, BUTTON_DOMAIN)
|
await init_integration(hass, BUTTON_DOMAIN)
|
||||||
|
|
||||||
corrdinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][
|
coordinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][
|
||||||
"coordinator"
|
"coordinator"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Test resuming the printer when it is paused
|
# Test resuming the printer when it is paused
|
||||||
with patch("pyoctoprintapi.OctoprintClient.resume_job") as resume_command:
|
with patch("pyoctoprintapi.OctoprintClient.resume_job") as resume_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{"state": {"flags": {"printing": False, "paused": True}}, "temperature": []}
|
{"state": {"flags": {"printing": False, "paused": True}}, "temperature": []}
|
||||||
)
|
)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
@ -100,7 +100,7 @@ async def test_resume_job(hass: HomeAssistant):
|
|||||||
|
|
||||||
# Test resuming the printer when it is printing
|
# Test resuming the printer when it is printing
|
||||||
with patch("pyoctoprintapi.OctoprintClient.resume_job") as resume_command:
|
with patch("pyoctoprintapi.OctoprintClient.resume_job") as resume_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{"state": {"flags": {"printing": True, "paused": False}}, "temperature": []}
|
{"state": {"flags": {"printing": True, "paused": False}}, "temperature": []}
|
||||||
)
|
)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
@ -118,7 +118,7 @@ async def test_resume_job(hass: HomeAssistant):
|
|||||||
with patch(
|
with patch(
|
||||||
"pyoctoprintapi.OctoprintClient.resume_job"
|
"pyoctoprintapi.OctoprintClient.resume_job"
|
||||||
) as resume_command, pytest.raises(InvalidPrinterState):
|
) as resume_command, pytest.raises(InvalidPrinterState):
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{
|
{
|
||||||
"state": {"flags": {"printing": False, "paused": False}},
|
"state": {"flags": {"printing": False, "paused": False}},
|
||||||
"temperature": [],
|
"temperature": [],
|
||||||
@ -138,13 +138,13 @@ async def test_stop_job(hass: HomeAssistant):
|
|||||||
"""Test the stop job button."""
|
"""Test the stop job button."""
|
||||||
await init_integration(hass, BUTTON_DOMAIN)
|
await init_integration(hass, BUTTON_DOMAIN)
|
||||||
|
|
||||||
corrdinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][
|
coordinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][
|
||||||
"coordinator"
|
"coordinator"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Test stopping the printer when it is paused
|
# Test stopping the printer when it is paused
|
||||||
with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command:
|
with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{"state": {"flags": {"printing": False, "paused": True}}, "temperature": []}
|
{"state": {"flags": {"printing": False, "paused": True}}, "temperature": []}
|
||||||
)
|
)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
@ -160,7 +160,7 @@ async def test_stop_job(hass: HomeAssistant):
|
|||||||
|
|
||||||
# Test stopping the printer when it is printing
|
# Test stopping the printer when it is printing
|
||||||
with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command:
|
with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{"state": {"flags": {"printing": True, "paused": False}}, "temperature": []}
|
{"state": {"flags": {"printing": True, "paused": False}}, "temperature": []}
|
||||||
)
|
)
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
@ -176,7 +176,7 @@ async def test_stop_job(hass: HomeAssistant):
|
|||||||
|
|
||||||
# Test stopping the printer when it is stopped
|
# Test stopping the printer when it is stopped
|
||||||
with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command:
|
with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command:
|
||||||
corrdinator.data["printer"] = OctoprintPrinterInfo(
|
coordinator.data["printer"] = OctoprintPrinterInfo(
|
||||||
{
|
{
|
||||||
"state": {"flags": {"printing": False, "paused": False}},
|
"state": {"flags": {"printing": False, "paused": False}},
|
||||||
"temperature": [],
|
"temperature": [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user