mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 14:26:10 -04:00
Revocation: expect application/json (boulder#771).
This commit is contained in:
parent
67d6b89382
commit
39aff967a5
2 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue