#2887 - Final test changes before end of day

This commit is contained in:
Charlie Crane
2025-01-23 17:42:59 +00:00
parent 30c177c272
commit a7395c466e
2 changed files with 32 additions and 30 deletions

View File

@@ -12,12 +12,12 @@ def test_passing_actions_down(monkeypatch) -> None:
sim = Simulation()
pc1 = Computer(hostname="PC-1", ip_address="10.10.1.1", subnet_mask="255.255.255.0")
pc1 = Computer.from_config(config={"type":"computer", "hostname":"PC-1", "ip_address":"10.10.1.1", "subnet_mask":"255.255.255.0"})
pc1.start_up_duration = 0
pc1.power_on()
pc2 = Computer(hostname="PC-2", ip_address="10.10.1.2", subnet_mask="255.255.255.0")
srv = Server(hostname="WEBSERVER", ip_address="10.10.1.100", subnet_mask="255.255.255.0")
s1 = Switch(hostname="switch1")
pc2 = Computer.from_config(config={"type":"computer", "hostname":"PC-2", "ip_address":"10.10.1.2", "subnet_mask":"255.255.255.0"})
srv = Server.from_config(config={"type":"server", "hostname":"WEBSERVER", "ip_address":"10.10.1.100", "subnet_mask":"255.255.255.0"})
s1 = Switch.from_config(config={"type":"switch", "hostname":"switch1"})
for n in [pc1, pc2, srv, s1]:
sim.network.add_node(n)
@@ -48,6 +48,6 @@ def test_passing_actions_down(monkeypatch) -> None:
assert not action_invoked
# call the patched method
sim.apply_request(["network", "node", pc1.hostname, "file_system", "folder", "downloads", "repair"])
sim.apply_request(["network", "node", pc1.config.hostname, "file_system", "folder", "downloads", "repair"])
assert action_invoked