From 57726e6384ba4a13d6f1e0656a98c8cbd7fdb345 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Sun, 8 Nov 2015 20:42:24 +0200 Subject: [PATCH] Use python2.6 compatible test assertions --- letsencrypt/tests/cli_test.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/letsencrypt/tests/cli_test.py b/letsencrypt/tests/cli_test.py index bb6309968..bd41b0ebe 100644 --- a/letsencrypt/tests/cli_test.py +++ b/letsencrypt/tests/cli_test.py @@ -177,25 +177,23 @@ class CLITest(unittest.TestCase): def test_check_config_sanity_domain(self): # Punycode - self.assertRaisesRegexp(errors.ConfigurationError, - "Error: Punycode domains are not supported", - self._call, - ['-d', 'this.is.xn--ls8h.tld']) + self.assertRaises(errors.ConfigurationError, + self._call, + ['-d', 'this.is.xn--ls8h.tld']) # FQDN - self.assertRaisesRegexp(errors.ConfigurationError, - "Error: Requested domain is not FQDN", - self._call, - ['-d', 'comma,gotwrong.tld']) + self.assertRaises(errors.ConfigurationError, + "Error: Requested domain is not FQDN", + self._call, + ['-d', 'comma,gotwrong.tld']) # FQDN 2 - self.assertRaisesRegexp(errors.ConfigurationError, - "Error: Requested domain is not FQDN", - self._call, - ['-d', 'illegal.character=.tld']) + self.assertRaises(errors.ConfigurationError, + "Error: Requested domain is not FQDN", + self._call, + ['-d', 'illegal.character=.tld']) # Wildcard - self.assertRaisesRegexp(errors.ConfigurationError, - "Error: Wildcard domains are not supported", - self._call, - ['-d', '*.wildcard.tld']) + self.assertRaises(errors.ConfigurationError, + self._call, + ['-d', '*.wildcard.tld']) @mock.patch('letsencrypt.crypto_util.notAfter') @mock.patch('letsencrypt.cli.zope.component.getUtility')