mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04:00
Put in dummy challenge
This commit is contained in:
parent
fa992faf52
commit
67ec4d09ee
3 changed files with 8 additions and 4 deletions
|
|
@ -34,6 +34,11 @@ class DVChallenge(Challenge): # pylint: disable=abstract-method
|
|||
"""Domain validation challenges."""
|
||||
|
||||
|
||||
class UnrecognizedChallenge(DVChallenge):
|
||||
"""Unrecognized challenge."""
|
||||
typ = "unknown"
|
||||
|
||||
|
||||
class ChallengeResponse(jose.TypedJSONObjectWithFields):
|
||||
# _fields_to_partial_json | pylint: disable=abstract-method
|
||||
"""ACME challenge response."""
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
import collections
|
||||
|
||||
from acme import challenges
|
||||
from acme import errors
|
||||
from acme import fields
|
||||
from acme import jose
|
||||
from acme import util
|
||||
|
|
@ -383,7 +382,9 @@ class Authorization(ResourceBody):
|
|||
try:
|
||||
challs.append(ChallengeBody.from_json(chall))
|
||||
except jose.UnrecognizedTypeError:
|
||||
continue
|
||||
challs.append(ChallengeBody(
|
||||
uri="UNKNOWN", chall=challenges.UnrecognizedChallenge,
|
||||
status=STATUS_UNKNOWN))
|
||||
return tuple(challs)
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -275,8 +275,6 @@ class AuthorizationTest(unittest.TestCase):
|
|||
from acme.messages import ChallengeBody
|
||||
from acme.messages import STATUS_VALID
|
||||
|
||||
unknown_chall = mock.MagicMock()
|
||||
unknown_chall.to_json.side_effect = side_effect=jose.UnrecognizedTypeError
|
||||
self.challbs = (
|
||||
ChallengeBody(
|
||||
uri='http://challb1', status=STATUS_VALID,
|
||||
|
|
|
|||
Loading…
Reference in a new issue