From 0f30f9e96ff346cc88b7217f9e236f25aa727577 Mon Sep 17 00:00:00 2001 From: Baime Date: Sat, 15 Jul 2017 15:17:25 +0200 Subject: [PATCH] Added test to check revoke cert by key mismatch --- certbot/tests/main_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py index 25f8d1631..c86e53834 100644 --- a/certbot/tests/main_test.py +++ b/certbot/tests/main_test.py @@ -1026,6 +1026,12 @@ class MainTest(test_util.TempDirTestCase): # pylint: disable=too-many-public-me jose.ComparableX509(cert), mock.ANY) + def test_revoke_with_key_mismatch(self): + server = 'foo.bar' + self.assertRaises(errors.Error, self._call_no_clientmock, + ['--cert-path', CERT, '--key-path', KEY, + '--server', server, 'revoke']) + @mock.patch('certbot.main._determine_account') def test_revoke_without_key(self, mock_determine_account): mock_determine_account.return_value = (mock.MagicMock(), None)