add test for other challenges

This commit is contained in:
Q 2023-04-21 19:33:29 +01:00
parent 1999f10ce5
commit c20dcf6918
No known key found for this signature in database
GPG key ID: 2A6427FE566B8419

View file

@ -44,6 +44,15 @@ class ChallengeFactoryTest(unittest.TestCase):
assert [achall.chall for achall in achalls] == [acme_util.HTTP01]
def test_unrecognized(self):
authzr = acme_util.gen_authzr(
messages.STATUS_PENDING, "test",
[mock.Mock(chall="chall", typ="unrecognized")],
[messages.STATUS_PENDING])
achalls = self.handler._challenge_factory(authzr, [0])
assert type(achalls[0]) == achallenges.Other
class HandleAuthorizationsTest(unittest.TestCase):
"""handle_authorizations test.