diff options
author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2017-03-03 04:27:29 +0300 |
---|---|---|
committer | Brad Warren <bmw@users.noreply.github.com> | 2017-03-03 04:27:29 +0300 |
commit | 53117b0ce0f9e781ae9a44570cfc7dc3891bb918 (patch) | |
tree | 5c3521c4fad078a61f4dc25f80b5cd4e0a84c0c6 /acme | |
parent | 26a7023b8dd985674dbf9ff2d35d4065ca7cae9d (diff) |
Remove UnexpectedUpdate exceptions. (#4197)
* Remove UnexpectedUpdate exceptions.
These exceptions trigger when the server sends the client back an object with a
field that doesn't exactly match what the client previously sent.
This causes unnecessary breakage in various cases, doesn't prevent any problems,
and isn't required by spec.
* Back out all UnexpectedUpdate removals except registration update.
Diffstat (limited to 'acme')
-rw-r--r-- | acme/acme/client.py | 3 | ||||
-rw-r--r-- | acme/acme/client_test.py | 10 |
2 files changed, 0 insertions, 13 deletions
diff --git a/acme/acme/client.py b/acme/acme/client.py index ddcba7635..6c5ed79a2 100644 --- a/acme/acme/client.py +++ b/acme/acme/client.py @@ -134,8 +134,6 @@ class Client(object): # pylint: disable=too-many-instance-attributes update = regr.body if update is None else update body = messages.UpdateRegistration(**dict(update)) updated_regr = self._send_recv_regr(regr, body=body) - if updated_regr != regr: - raise errors.UnexpectedUpdate(regr) return updated_regr def deactivate_registration(self, regr): @@ -301,7 +299,6 @@ class Client(object): # pylint: disable=too-many-instance-attributes response = self.net.get(authzr.uri) updated_authzr = self._authzr_from_response( response, authzr.body.identifier, authzr.uri, authzr.new_cert_uri) - # TODO: check and raise UnexpectedUpdate return updated_authzr, response def request_issuance(self, csr, authzrs): diff --git a/acme/acme/client_test.py b/acme/acme/client_test.py index b3db21ac9..7e7ffe779 100644 --- a/acme/acme/client_test.py +++ b/acme/acme/client_test.py @@ -121,8 +121,6 @@ class ClientTest(unittest.TestCase): # TODO: split here and separate test self.response.json.return_value = self.regr.body.update( contact=()).to_json() - self.assertRaises( - errors.UnexpectedUpdate, self.client.update_registration, self.regr) def test_deactivate_account(self): self.response.headers['Location'] = self.regr.uri @@ -130,14 +128,6 @@ class ClientTest(unittest.TestCase): self.assertEqual(self.regr, self.client.deactivate_registration(self.regr)) - def test_deactivate_account_bad_registration_returned(self): - self.response.headers['Location'] = self.regr.uri - self.response.json.return_value = "some wrong registration thing" - self.assertRaises( - errors.UnexpectedUpdate, - self.client.deactivate_registration, - self.regr) - def test_query_registration(self): self.response.json.return_value = self.regr.body.to_json() self.assertEqual(self.regr, self.client.query_registration(self.regr)) |