Skip to content

Commit

Permalink
Factor out accessing planned_maintenances
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Jul 31, 2024
1 parent 66a048a commit e72201e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/api/legacy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,9 @@ class TestZino1ServerProtocolPmListCommand:
async def test_when_authenticated_should_list_all_pm_ids(
self, authenticated_protocol, active_device_pm, active_portstate_pm
):
authenticated_protocol._state.planned_maintenances.planned_maintenances[active_device_pm.id] = active_device_pm
authenticated_protocol._state.planned_maintenances.planned_maintenances[active_portstate_pm.id] = (
active_portstate_pm
)
planned_maintenances = authenticated_protocol._state.planned_maintenances.planned_maintenances
planned_maintenances[active_device_pm.id] = active_device_pm
planned_maintenances[active_portstate_pm.id] = active_portstate_pm

await authenticated_protocol.message_received("PM LIST")
response = authenticated_protocol.transport.data_buffer.getvalue().decode("utf-8")
Expand Down

0 comments on commit e72201e

Please sign in to comment.