Unittest - Replace None by objects representing the state of stdout/err