patching sys.stdout to be a tty in tests instead of relying on it
patching sys.stdout to be a tty in tests instead of relying on it
ensuring that there are no prompts in absence of a tty or in the case of a dryrun
extracting base test class, adding some basic tests for handle()