def test_insert_child_without_parent_v5( zork_v5_obj_table: ZMachineObjectTable): zork_v5_obj_table.insert_child(46, 68) west_of_house_tree = zork_v5_obj_table.obj_tree(68) assert len(west_of_house_tree['children']) == 3 assert west_of_house_tree['children'][0]['number'] == 46
def test_insert_child_with_parent_v5(zork_v5_obj_table: ZMachineObjectTable): # Take machine out of Machine room and put in West of House zork_v5_obj_table.insert_child(215, 68) west_of_house_tree = zork_v5_obj_table.obj_tree(68) assert len(west_of_house_tree['children']) == 3 assert west_of_house_tree['children'][0]['number'] == 215 machine_room_tree = zork_v5_obj_table.obj_tree(93) assert len(machine_room_tree['children']) == 1 assert machine_room_tree['children'][0]['number'] == 105
def test_insert_child_with_parent_v3(zork_v3_obj_table: ZMachineObjectTable): # Take machine out of Machine room and put in West of House zork_v3_obj_table.insert_child(158, 180) west_of_house_tree = zork_v3_obj_table.obj_tree(180) assert len(west_of_house_tree['children']) == 3 assert west_of_house_tree['children'][0]['number'] == 158 machine_room_tree = zork_v3_obj_table.obj_tree(157) assert len(machine_room_tree['children']) == 1 assert machine_room_tree['children'][0]['number'] == 112