#2084: apply previous PR suggestions

This commit is contained in:
Czar Echavez
2023-12-04 09:07:42 +00:00
parent 534d4f96f3
commit 8f063aa339

View File

@@ -53,7 +53,7 @@ def test_reset_network(network):
server_1.power_off()
assert server_1.operating_state is NodeOperatingState.SHUTTING_DOWN
assert network.describe_state() is not state_before
assert network.describe_state() != state_before
network.reset_component_for_episode(episode=1)
@@ -79,12 +79,16 @@ def test_apply_timestep_to_nodes(network):
assert client_1.operating_state is NodeOperatingState.ON
client_1.power_off()
assert client_1.operating_state is NodeOperatingState.SHUTTING_DOWN
for i in range(client_1.shut_down_duration + 1):
network.apply_timestep(timestep=i)
assert client_1.operating_state is NodeOperatingState.OFF
network.apply_timestep(client_1.shut_down_duration + 2)
assert client_1.operating_state is NodeOperatingState.OFF
def test_removing_node_that_does_not_exist(network):
"""Node that does not exist on network should not affect existing nodes."""