Revocation: expect application/json (boulder#771).

This commit is contained in:
Jakub Warmuz 2015-09-10 20:14:47 +00:00
parent 67d6b89382
commit 39aff967a5
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA
2 changed files with 2 additions and 3 deletions

View file

@ -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')

View file

@ -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