mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 02:44:21 +02:00
(cherry picked from commit f4bac423fb)
This commit is contained in:
+1
-2
@@ -227,8 +227,7 @@ class ClientBase(object): # pylint: disable=too-many-instance-attributes
|
|||||||
response = self._post(url,
|
response = self._post(url,
|
||||||
messages.Revocation(
|
messages.Revocation(
|
||||||
certificate=cert,
|
certificate=cert,
|
||||||
reason=rsn),
|
reason=rsn))
|
||||||
content_type=None)
|
|
||||||
if response.status_code != http_client.OK:
|
if response.status_code != http_client.OK:
|
||||||
raise errors.ClientError(
|
raise errors.ClientError(
|
||||||
'Successful revocation must return HTTP OK status')
|
'Successful revocation must return HTTP OK status')
|
||||||
|
|||||||
@@ -635,8 +635,7 @@ class ClientTest(ClientTestBase):
|
|||||||
def test_revoke(self):
|
def test_revoke(self):
|
||||||
self.client.revoke(self.certr.body, self.rsn)
|
self.client.revoke(self.certr.body, self.rsn)
|
||||||
self.net.post.assert_called_once_with(
|
self.net.post.assert_called_once_with(
|
||||||
self.directory[messages.Revocation], mock.ANY, content_type=None,
|
self.directory[messages.Revocation], mock.ANY, acme_version=1)
|
||||||
acme_version=1)
|
|
||||||
|
|
||||||
def test_revocation_payload(self):
|
def test_revocation_payload(self):
|
||||||
obj = messages.Revocation(certificate=self.certr.body, reason=self.rsn)
|
obj = messages.Revocation(certificate=self.certr.body, reason=self.rsn)
|
||||||
@@ -776,8 +775,7 @@ class ClientV2Test(ClientTestBase):
|
|||||||
def test_revoke(self):
|
def test_revoke(self):
|
||||||
self.client.revoke(messages_test.CERT, self.rsn)
|
self.client.revoke(messages_test.CERT, self.rsn)
|
||||||
self.net.post.assert_called_once_with(
|
self.net.post.assert_called_once_with(
|
||||||
self.directory["revokeCert"], mock.ANY, content_type=None,
|
self.directory["revokeCert"], mock.ANY, acme_version=2)
|
||||||
acme_version=2)
|
|
||||||
|
|
||||||
|
|
||||||
class MockJSONDeSerializable(jose.JSONDeSerializable):
|
class MockJSONDeSerializable(jose.JSONDeSerializable):
|
||||||
|
|||||||
Reference in New Issue
Block a user