mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 16:19:13 +02:00
Come on Python 2.6...
This commit is contained in:
@@ -63,18 +63,18 @@ class CLITest(unittest.TestCase):
|
|||||||
cmd_arg = ['config_changes']
|
cmd_arg = ['config_changes']
|
||||||
error = [errors.Error('problem')]
|
error = [errors.Error('problem')]
|
||||||
attrs = {'view_config_changes.side_effect' : error}
|
attrs = {'view_config_changes.side_effect' : error}
|
||||||
with self.assertRaises(errors.Error):
|
self.assertRaises(
|
||||||
self._call(['--debug'] + cmd_arg, attrs)
|
errors.Error, self._call, ['--debug'] + cmd_arg, attrs)
|
||||||
self._call(cmd_arg, attrs)
|
self._call(cmd_arg, attrs)
|
||||||
|
|
||||||
attrs['view_config_changes.side_effect'] = [KeyboardInterrupt]
|
attrs['view_config_changes.side_effect'] = [KeyboardInterrupt]
|
||||||
with self.assertRaises(KeyboardInterrupt):
|
self.assertRaises(
|
||||||
self._call(['--debug'] + cmd_arg, attrs)
|
KeyboardInterrupt, self._call, ['--debug'] + cmd_arg, attrs)
|
||||||
self._call(cmd_arg, attrs)
|
self._call(cmd_arg, attrs)
|
||||||
|
|
||||||
attrs['view_config_changes.side_effect'] = [ValueError]
|
attrs['view_config_changes.side_effect'] = [ValueError]
|
||||||
with self.assertRaises(ValueError):
|
self.assertRaises(
|
||||||
self._call(['--debug'] + cmd_arg, attrs)
|
ValueError, self._call, ['--debug'] + cmd_arg, attrs)
|
||||||
self._call(cmd_arg, attrs)
|
self._call(cmd_arg, attrs)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user