Fix typos.

This commit is contained in:
Jakub Warmuz
2015-02-10 22:04:04 +00:00
parent d9e4a5ab86
commit edd207fef9
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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):
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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')