Having a Python functions as below:
def get_student_id():
while True:
try:
print("ENTER STUDENT ID: ")
identity = int(input())
if identity > 0:
return identity
else:
print("That's not a natural number. Try again: ")
except ValueError:
print("That's not an integer. Try again: ")
and
def test_get_student_id():
with mock.patch.object(builtins, 'input', lambda _: '19'):
assert get_student_id() == '19'
Run pytest command to receive an error: TypeError: test_GetStudentId..() missing 1 required positional argument: '_'
Please help to fix above error. Thanks.