def test_version_string_program_name(self):
    toy_out = io.StringIO()
    toy_err = io.StringIO()
    with mock.patch('certbot._internal.main.sys.stdout', new=toy_out):
        with mock.patch('certbot._internal.main.sys.stderr', new=toy_err):
            try:
                main.main(['--version'])
            except SystemExit:
                pass
            finally:
                output = (toy_out.getvalue() or toy_err.getvalue())
                self.assertTrue(('certbot' in output), 'Output is {0}'.format(output))
def test_version_string_program_name(self):
    toy_out = io.StringIO()
    toy_err = io.StringIO()
    with mock.patch('certbot._internal.main.sys.stdout', new=toy_out):
        with mock.patch('certbot._internal.main.sys.stderr', new=toy_err):
            try:
                main.main(['--version'])
            except SystemExit:
                pass
            finally:
                output = (toy_out.getvalue() or toy_err.getvalue())
                self.assertTrue(('certbot' in output), 'Output is {0}'.format(output))