def test_node_from_index_lower_than_complete_directions_len_with_node_file_type_down(
):
    expected_node = "down1.onion"
    actual_node = node_from_index(2, seed_directions, node_files, type="down")

    assert expected_node == actual_node
def test_node_from_index_lower_than_seed_directions_len_with_node_file_type_comm(
):
    expected_node = "comm.onion"
    actual_node = node_from_index(0, seed_directions, node_files)

    assert expected_node == actual_node
def test_node_from_index_higher_than_seed_directions_len_without_node_file():
    with pytest.raises(UnboundLocalError):
        node_from_index(1, seed_directions)
def test_node_from_index_negative_number_lower_than_list_length():
    with pytest.raises(IndexError):
        node_from_index(-2, seed_directions)
def test_node_from_index_lower_than_seed_directions_len_without_node_file_type_down(
):
    expected_node = "down.onion"
    actual_node = node_from_index(0, seed_directions, type="down")

    assert expected_node == actual_node