def test_append_one():
  test_list = LinkedList()
  test_list.insert(2)
  test_list.insert(3)
  test_list.insert(1)
  test_list.append(5)
  actual = str(test_list)
  expected = "{ 1 } -> { 3 } -> { 2 } -> { 5 } -> NULL"
  assert actual == expected
def test_insertBefore_notInList():
  test_list = LinkedList()
  test_list.insert(3)
  test_list.insert(1)
  test_list.append(5)
  test_list.append(11)
  test_list.append(3)
  actual = test_list.insertBefore(16,31)
  expected = "An error has occured"
  assert actual == expected
def test_insertBefore_begin():
  test_list = LinkedList()
  test_list.insert(3)
  test_list.insert(1)
  test_list.append(5)
  test_list.append(11)
  test_list.append(3)
  test_list.insertBefore(1,31)
  actual = str(test_list)
  expected = "{ 31 } -> { 1 } -> { 3 } -> { 5 } -> { 11 } -> { 3 } -> NULL"
  assert actual == expected
def test_insertBefore_middle():
  test_list = LinkedList()
  test_list.insert(3)
  test_list.insert(1)
  test_list.append(5)
  test_list.append(11)
  test_list.append(3)
  test_list.insertBefore(5,8)
  actual = str(test_list)
  expected = "{ 1 } -> { 3 } -> { 8 } -> { 5 } -> { 11 } -> { 3 } -> NULL"
  assert actual == expected
def test_append_empty_number():
  test_list = LinkedList()
  test_list.append(3)
  actual = str(test_list)
  expected = "{ 3 } -> NULL"
  assert actual == expected
def test_append_one_emtpy():
  test_list = LinkedList()
  test_list.append("only thing")
  actual = test_list.head.value
  expected = "only thing"
  assert actual == expected