Make python 2.6 happy with the assertRaises

This commit is contained in:
Joona Hoikkala 2015-12-11 13:17:21 +02:00
parent 4d31a8cb39
commit 0805b08162

View file

@ -221,8 +221,9 @@ class TwoVhost80Test(util.ApacheTest):
self.assertTrue(self.config.is_site_enabled(self.vh_truth[3].filep))
with mock.patch("os.path.isdir") as mock_isdir:
mock_isdir.return_value = False
with (self.assertRaises(errors.ConfigurationError)):
self.config.is_site_enabled("irrelevant")
self.assertRaises(errors.ConfigurationError,
self.config.is_site_enabled,
"irrelevant")
@mock.patch("letsencrypt.le_util.run_script")
@mock.patch("letsencrypt.le_util.exe_exists")