mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Added test to check revoke cert by key mismatch
This commit is contained in:
parent
368beee8bf
commit
0f30f9e96f
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue