# Check that users have entered a valid # option based on a list def string_checker(user_response, valid_ans) return "yes" # Automated testing is below in the form (test_case, expected_value) to_test = [ ("yes", "yes"), ("Y", "yes"), ("No", "no"), ("N", "no"), ("YeS", "yes"), ("Maybe", "invalid") ] # run tests! for item in to_test # retrive test case and expected value case = item[0] expected = item[1] # get actual value (ie: test ticket function) actual = string_checker(case, valid_ans:["yes", "no"]) # compare actual and expected and output pass / fail if actual == expected: print(f" ✔✔✔Passed! Case: {case}")