From 7370b7ba4c1d1c427d1dec09a999c7aac34c5938 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:36:12 -0400 Subject: [PATCH] Remove unnecessary unit tests for new behavior --- tests/test_application.py | 25 ------------------------- tests/test_ezsp.py | 6 ------ 2 files changed, 31 deletions(-) diff --git a/tests/test_application.py b/tests/test_application.py index c8641bfc..f50066f3 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -1854,28 +1854,3 @@ async def test_repair_tclk_partner_ieee(app: ControllerApplication) -> None: await app.start_network() assert len(app._reset.mock_calls) == 1 - - -async def test_startup_endpoint_register_already_running( - app: ControllerApplication, ieee: t.EmberEUI64 -) -> None: - """Test that the host is reset before endpoint registration if it is running.""" - - app._ezsp = _create_app_for_startup(app, t.EmberNodeType.COORDINATOR, ieee) - app._ezsp.addEndpoint = AsyncMock( - side_effect=[ - [t.EmberStatus.INVALID_CALL], # Fail the first time - [t.EmberStatus.SUCCESS], - [t.EmberStatus.SUCCESS], - [t.EmberStatus.SUCCESS], - ] - ) - - app._reset = AsyncMock() - - with patch.object(bellows.multicast.Multicast, "startup"): - await app.start_network() - - assert len(app._reset.mock_calls) == 1 - - assert app._ezsp.addEndpoint.call_count >= 3 diff --git a/tests/test_ezsp.py b/tests/test_ezsp.py index d9238ccb..30e04729 100644 --- a/tests/test_ezsp.py +++ b/tests/test_ezsp.py @@ -790,12 +790,6 @@ async def test_config_initialize_husbzb1(ezsp_f): await ezsp_f.write_config({}) assert ezsp_f.setConfigurationValue.mock_calls == expected_calls - # If there is no network, `CONFIG_PACKET_BUFFER_COUNT` won't be set - ezsp_f.setConfigurationValue.reset_mock() - ezsp_f.networkState = AsyncMock(return_value=(t.EmberNetworkStatus.NO_NETWORK,)) - await ezsp_f.write_config({}) - assert ezsp_f.setConfigurationValue.mock_calls == expected_calls[:-1] - @pytest.mark.parametrize("version", ezsp.EZSP._BY_VERSION) async def test_config_initialize(version: int, ezsp_f, caplog):