From d72802cfb00f4a8eabd9959d7f3b9f19a830007a Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 28 Nov 2022 16:42:20 +0100 Subject: [PATCH] Spelling - runtime and test changes (#82868) --- homeassistant/components/nzbget/const.py | 2 +- tests/components/octoprint/test_button.py | 24 +++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/homeassistant/components/nzbget/const.py b/homeassistant/components/nzbget/const.py index 673f2531a53..928487738eb 100644 --- a/homeassistant/components/nzbget/const.py +++ b/homeassistant/components/nzbget/const.py @@ -5,7 +5,7 @@ DOMAIN = "nzbget" ATTR_SPEED = "speed" # Data -DATA_COORDINATOR = "corrdinator" +DATA_COORDINATOR = "coordinator" DATA_UNDO_UPDATE_LISTENER = "undo_update_listener" # Defaults diff --git a/tests/components/octoprint/test_button.py b/tests/components/octoprint/test_button.py index 644c1e39437..cc99a8e4c1d 100644 --- a/tests/components/octoprint/test_button.py +++ b/tests/components/octoprint/test_button.py @@ -18,13 +18,13 @@ async def test_pause_job(hass: HomeAssistant): """Test the pause job button.""" await init_integration(hass, BUTTON_DOMAIN) - corrdinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][ + coordinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][ "coordinator" ] # Test pausing the printer when it is printing with patch("pyoctoprintapi.OctoprintClient.pause_job") as pause_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( {"state": {"flags": {"printing": True}}, "temperature": []} ) await hass.services.async_call( @@ -40,7 +40,7 @@ async def test_pause_job(hass: HomeAssistant): # Test pausing the printer when it is paused with patch("pyoctoprintapi.OctoprintClient.pause_job") as pause_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( {"state": {"flags": {"printing": False, "paused": True}}, "temperature": []} ) await hass.services.async_call( @@ -58,7 +58,7 @@ async def test_pause_job(hass: HomeAssistant): with patch( "pyoctoprintapi.OctoprintClient.pause_job" ) as pause_command, pytest.raises(InvalidPrinterState): - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( { "state": {"flags": {"printing": False, "paused": False}}, "temperature": [], @@ -78,13 +78,13 @@ async def test_resume_job(hass: HomeAssistant): """Test the resume job button.""" await init_integration(hass, BUTTON_DOMAIN) - corrdinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][ + coordinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][ "coordinator" ] # Test resuming the printer when it is paused with patch("pyoctoprintapi.OctoprintClient.resume_job") as resume_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( {"state": {"flags": {"printing": False, "paused": True}}, "temperature": []} ) await hass.services.async_call( @@ -100,7 +100,7 @@ async def test_resume_job(hass: HomeAssistant): # Test resuming the printer when it is printing with patch("pyoctoprintapi.OctoprintClient.resume_job") as resume_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( {"state": {"flags": {"printing": True, "paused": False}}, "temperature": []} ) await hass.services.async_call( @@ -118,7 +118,7 @@ async def test_resume_job(hass: HomeAssistant): with patch( "pyoctoprintapi.OctoprintClient.resume_job" ) as resume_command, pytest.raises(InvalidPrinterState): - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( { "state": {"flags": {"printing": False, "paused": False}}, "temperature": [], @@ -138,13 +138,13 @@ async def test_stop_job(hass: HomeAssistant): """Test the stop job button.""" await init_integration(hass, BUTTON_DOMAIN) - corrdinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][ + coordinator: OctoprintDataUpdateCoordinator = hass.data[DOMAIN]["uuid"][ "coordinator" ] # Test stopping the printer when it is paused with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( {"state": {"flags": {"printing": False, "paused": True}}, "temperature": []} ) await hass.services.async_call( @@ -160,7 +160,7 @@ async def test_stop_job(hass: HomeAssistant): # Test stopping the printer when it is printing with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( {"state": {"flags": {"printing": True, "paused": False}}, "temperature": []} ) await hass.services.async_call( @@ -176,7 +176,7 @@ async def test_stop_job(hass: HomeAssistant): # Test stopping the printer when it is stopped with patch("pyoctoprintapi.OctoprintClient.cancel_job") as stop_command: - corrdinator.data["printer"] = OctoprintPrinterInfo( + coordinator.data["printer"] = OctoprintPrinterInfo( { "state": {"flags": {"printing": False, "paused": False}}, "temperature": [],