mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
Revocation: expect application/json (boulder#771).
This commit is contained in:
+1
-2
@@ -454,8 +454,7 @@ class Client(object): # pylint: disable=too-many-instance-attributes
|
||||
|
||||
"""
|
||||
response = self.net.post(self.directory[messages.Revocation],
|
||||
messages.Revocation(certificate=cert),
|
||||
content_type=None)
|
||||
messages.Revocation(certificate=cert))
|
||||
if response.status_code != http_client.OK:
|
||||
raise errors.ClientError(
|
||||
'Successful revocation must return HTTP OK status')
|
||||
|
||||
@@ -360,7 +360,7 @@ class ClientTest(unittest.TestCase):
|
||||
def test_revoke(self):
|
||||
self.client.revoke(self.certr.body)
|
||||
self.net.post.assert_called_once_with(
|
||||
self.directory[messages.Revocation], mock.ANY, content_type=None)
|
||||
self.directory[messages.Revocation], mock.ANY)
|
||||
|
||||
def test_revoke_bad_status_raises_error(self):
|
||||
self.response.status_code = http_client.METHOD_NOT_ALLOWED
|
||||
|
||||
Reference in New Issue
Block a user