From 606636766e85469bd7268a12f24a39797a4c02aa Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 29 Aug 2016 14:13:52 -0700 Subject: [PATCH] Test preferred challenges not supported --- certbot/tests/auth_handler_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/certbot/tests/auth_handler_test.py b/certbot/tests/auth_handler_test.py index e6e2445d9..4e2db2712 100644 --- a/certbot/tests/auth_handler_test.py +++ b/certbot/tests/auth_handler_test.py @@ -167,6 +167,13 @@ class GetAuthorizationsTest(unittest.TestCase): def test_no_domains(self): self.assertRaises(errors.AuthorizationError, self.handler.get_authorizations, []) + def test_preferred_challenges_not_supported(self): + self.mock_net.request_domain_challenges.side_effect = functools.partial( + gen_dom_authzr, challs=acme_util.CHALLENGES) + self.handler.pref_challs.append(challenges.HTTP01) + self.assertRaises( + errors.AuthorizationError, self.handler.get_authorizations, ["0"]) + def _validate_all(self, unused_1, unused_2): for dom in six.iterkeys(self.handler.authzr): azr = self.handler.authzr[dom]