mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
Adding test for unsupported MX error
This commit is contained in:
parent
ceb02f9731
commit
fe1ab15f4b
1 changed files with 8 additions and 0 deletions
|
|
@ -83,6 +83,14 @@ class RegisterTest(unittest.TestCase):
|
|||
self._call()
|
||||
mock_logger.warn.assert_called_once_with(mock.ANY)
|
||||
|
||||
def test_unsupported_error(self):
|
||||
from acme import messages
|
||||
msg = "Test"
|
||||
mx_err = messages.Error(detail=msg, typ="malformed", title="title")
|
||||
with mock.patch("letsencrypt.client.acme_client.Client") as mock_client:
|
||||
mock_client().register.side_effect = [mx_err, mock.MagicMock()]
|
||||
self.assertRaises(messages.Error, self._call)
|
||||
|
||||
class ClientTest(unittest.TestCase):
|
||||
"""Tests for letsencrypt.client.Client."""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue