def test_insert_index_2_many_element_list(self):
     linked = LinkedList(['one', 'two', 4])
     linked.insert_at_index(2, '3')
     self.assertEqual('3', linked.get_node_with_value('3').data)
     self.assertEqual(4, linked.get_node_with_value('3').next.data)
     self.assertEqual("| one | -> | two | -> | 3 | -> | 4 | -> None", str(linked))
 def test_insert_bottom_many_element_list(self):
     linked = LinkedList(['one', 'two', 3])
     linked.insert_to_the_bottom(4.34)
     self.assertEqual(4.34, linked.get_node_with_value(4.34).data)
     self.assertEqual(None, linked.get_node_with_value(4.34).next)
     self.assertEqual("| one | -> | two | -> | 3 | -> | 4.34 | -> None", str(linked))
 def test_get_node_value_doesnot_exist(self):
     linked = LinkedList(['one', 'two', 3, 4, 5])
     self.assertEqual(None, linked.get_node_with_value(6.7))
 def test_get_node_value_exists_1(self):
     linked = LinkedList(['one', 'two', 3])
     self.assertEqual(3, linked.get_node_with_value(3).data)
 def test_get_node_value_exists_0(self):
     linked = LinkedList(['one', 'two'])
     self.assertEqual('one', linked.get_node_with_value('one').data)
 def test_get_node_value_empty_list(self):
     linked = LinkedList([])
     self.assertEqual(None, linked.get_node_with_value('one'))