def _cli_missing_flag(self, args, message):
    'Ensure that a particular error raises a missing cli flag error containing message'
    exc = None
    try:
        with mock.patch('certbot._internal.main.sys.stderr'):
            main.main((self.standard_args + args[:]))
    except errors.MissingCommandlineFlag as exc_:
        exc = exc_
        self.assertTrue((message in str(exc)))
    self.assertTrue((exc is not None))
Ensure that a particular error raises a missing cli flag error containing message
def _cli_missing_flag(self, args, message):
    
    exc = None
    try:
        with mock.patch('certbot._internal.main.sys.stderr'):
            main.main((self.standard_args + args[:]))
    except errors.MissingCommandlineFlag as exc_:
        exc = exc_
        self.assertTrue((message in str(exc)))
    self.assertTrue((exc is not None))