def test_print_read_basic_info(self): f_name = "Ch #1 - Dustin.txt" params = ['Dustin', 30, 'dust7667'] ans = "Your name is {0}, you are {1} years old, and your username is {2}".format(params[0], params[1], params[2]) write_to_file(params) self.assertEqual(print_info(read_from_file(f_name)), ans)
def test_print_not_enough_info(self): params = ['Juan Jose', 30] ans = "You have not supplied the correct type of info" self.assertEqual(print_info(params), ans)
def test_print_blank_info(self): params = [] ans = "You have not supplied the correct type of info" self.assertEqual(print_info(params), ans)
def test_print_basic_info(self): params = ['Dustin', 30, 'dust7667'] ans = "Your name is {0}, you are {1} years old, and your username is {2}".format(params[0], params[1], params[2]) self.assertEqual(print_info(params), ans)