mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 16:14:44 +02:00
No longer mask failed challenge errors with encoding errors (#4867)
* no longer masker failed challenge errors with encoding errors * simplifying through type-checking * bytes
This commit is contained in:
@@ -28,7 +28,6 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
|
||||
class AnnotatedChallenge(jose.ImmutableMap):
|
||||
"""Client annotated challenge.
|
||||
|
||||
|
||||
@@ -23,6 +23,17 @@ class FailedChallengesTest(unittest.TestCase):
|
||||
self.assertTrue(str(self.error).startswith(
|
||||
"Failed authorization procedure. example.com (dns-01): tls"))
|
||||
|
||||
def test_unicode(self):
|
||||
from certbot.errors import FailedChallenges
|
||||
arabic_detail = u'\u0639\u062f\u0627\u0644\u0629'
|
||||
arabic_error = FailedChallenges(set([achallenges.DNS(
|
||||
domain="example.com", challb=messages.ChallengeBody(
|
||||
chall=acme_util.DNS01, uri=None,
|
||||
error=messages.Error(typ="tls", detail=arabic_detail)))]))
|
||||
|
||||
self.assertTrue(str(arabic_error).startswith(
|
||||
"Failed authorization procedure. example.com (dns-01): tls"))
|
||||
|
||||
|
||||
class StandaloneBindErrorTest(unittest.TestCase):
|
||||
"""Tests for certbot.errors.StandaloneBindError."""
|
||||
|
||||
Reference in New Issue
Block a user