mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Revert "Revocation: expect application/json (boulder#771)."
This reverts commit 39aff967a5.
This commit is contained in:
+2
-1
@@ -454,7 +454,8 @@ class Client(object): # pylint: disable=too-many-instance-attributes
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
response = self.net.post(self.directory[messages.Revocation],
|
response = self.net.post(self.directory[messages.Revocation],
|
||||||
messages.Revocation(certificate=cert))
|
messages.Revocation(certificate=cert),
|
||||||
|
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')
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ class ClientTest(unittest.TestCase):
|
|||||||
def test_revoke(self):
|
def test_revoke(self):
|
||||||
self.client.revoke(self.certr.body)
|
self.client.revoke(self.certr.body)
|
||||||
self.net.post.assert_called_once_with(
|
self.net.post.assert_called_once_with(
|
||||||
self.directory[messages.Revocation], mock.ANY)
|
self.directory[messages.Revocation], mock.ANY, content_type=None)
|
||||||
|
|
||||||
def test_revoke_bad_status_raises_error(self):
|
def test_revoke_bad_status_raises_error(self):
|
||||||
self.response.status_code = http_client.METHOD_NOT_ALLOWED
|
self.response.status_code = http_client.METHOD_NOT_ALLOWED
|
||||||
|
|||||||
Reference in New Issue
Block a user