Now using capsys fixture instead of monkeypatching