import unittest
from insert import insert_after

# Note: this test suite does not contain a complete set of test cases.
# Challenge: Extend it to the point that either you are convinced the
# function works as advertised in the docstring, or you have demonstrated
# that it doesn't.

class TestInsertAfter(unittest.TestCase):

    def test_insert_after_at_front(self):
        """ Test insert_after with one occurrence of n1 in L, at the front."""

        input_list = [0, 1, 2, 3]
        return_value = insert_after(input_list, 0, 99)
        expected = [0, 99, 1, 2, 3]
        self.assertEqual(input_list, expected)    
        self.assertEqual(return_value, None)
        
    def test_insert_after_at_back(self):
        """ Test insert_after with one occurrence of n1 in L, at the back."""

        input_list = [0, 1, 2, 3]
        return_value = insert_after(input_list, 3, 99)
        expected = [0, 1, 2, 3, 99]
        self.assertEqual(input_list, expected)    
        self.assertEqual(return_value, None)
        
    def test_insert_after_middle(self):
        """ Test insert_after with one occurrence of n1 in L, not on 
        either end."""

        input_list = [0, 1, 2, 3]
        return_value = insert_after(input_list, 1, 99)
        expected = [0, 1, 99, 2, 3]
        self.assertEqual(input_list, expected)    
        self.assertEqual(return_value, None)
        
if __name__ == '__main__':
    unittest.main(exit=False)