There's no harm in calling disconnect_nodes for nodes that weren't connected (in this case it's a no-op). However, detecting this case and logging a warning can help ensure that tests are behaving as expected.
In addition, since disconnect_nodes works bidirectionally, I removed all instances of this pattern:
disconnect_nodes(self.nodes[0], 1)
disconnect_nodes(self.nodes[1], 0)