How can I write a unittest
that will press a key at the right time so I can test the check
method below and it doesn't wait forever for a key press.
class MyProject():
def __init__(self):
self.info = ""
def check(self):
# goes online to fetch data and saves it to self.info
input("Press any key to continue...")
def main_function(self):
# this method does the main task