mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56:55 +02:00
Fix typos.
This commit is contained in:
@@ -6,7 +6,7 @@ class Error(Exception):
|
|||||||
class ValidationError(Error):
|
class ValidationError(Error):
|
||||||
"""ACME message validation error."""
|
"""ACME message validation error."""
|
||||||
|
|
||||||
class UnrecognnizedMessageTypeError(ValidationError):
|
class UnrecognizedMessageTypeError(ValidationError):
|
||||||
"""Unrecognized ACME message type error."""
|
"""Unrecognized ACME message type error."""
|
||||||
|
|
||||||
class SchemaValidationError(ValidationError):
|
class SchemaValidationError(ValidationError):
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Message(util.JSONDeSerializable, util.ImmutableMap):
|
|||||||
"""Get JSON serializable object.
|
"""Get JSON serializable object.
|
||||||
|
|
||||||
:returns: Serializable JSON object representing ACME message.
|
:returns: Serializable JSON object representing ACME message.
|
||||||
:meth:`validate` will almost certianly not work, due to reasons
|
:meth:`validate` will almost certainly not work, due to reasons
|
||||||
explained in :class:`letsencrypt.acme.interfaces.IJSONSerializable`.
|
explained in :class:`letsencrypt.acme.interfaces.IJSONSerializable`.
|
||||||
:rtype: dict
|
:rtype: dict
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ class Message(util.JSONDeSerializable, util.ImmutableMap):
|
|||||||
try:
|
try:
|
||||||
msg_cls = cls.TYPES[msg_type]
|
msg_cls = cls.TYPES[msg_type]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise errors.UnrecognnizedMessageTypeError(msg_type)
|
raise errors.UnrecognizedMessageTypeError(msg_type)
|
||||||
|
|
||||||
if validate:
|
if validate:
|
||||||
msg_cls.validate_json(jobj)
|
msg_cls.validate_json(jobj)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class MessageTest(unittest.TestCase):
|
|||||||
self.assertRaises(errors.ValidationError, self._from_json, {})
|
self.assertRaises(errors.ValidationError, self._from_json, {})
|
||||||
|
|
||||||
def test_from_json_unknown_type_fails(self):
|
def test_from_json_unknown_type_fails(self):
|
||||||
self.assertRaises(errors.UnrecognnizedMessageTypeError,
|
self.assertRaises(errors.UnrecognizedMessageTypeError,
|
||||||
self._from_json, {'type': 'bar'})
|
self._from_json, {'type': 'bar'})
|
||||||
|
|
||||||
@mock.patch('letsencrypt.acme.messages.Message.TYPES')
|
@mock.patch('letsencrypt.acme.messages.Message.TYPES')
|
||||||
|
|||||||
Reference in New Issue
Block a user