Skip to content

Commit

Permalink
Remove unnecessary unit tests for new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Oct 23, 2023
1 parent a6abec0 commit 7370b7b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
25 changes: 0 additions & 25 deletions tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions tests/test_ezsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7370b7b

Please sign in to comment.