mirror of
https://github.com/certbot/certbot.git
synced 2026-04-28 17:51:04 -04:00
Adding test for client, register_unsafely_without_email=True
This commit is contained in:
parent
5996318e40
commit
e4fb4108ff
1 changed files with 9 additions and 0 deletions
|
|
@ -74,6 +74,15 @@ class RegisterTest(unittest.TestCase):
|
|||
self.config.email = None
|
||||
self.assertRaises(errors.Error, self._call)
|
||||
|
||||
@mock.patch("letsencrypt.client.logger")
|
||||
def test_without_email(self, mock_logger):
|
||||
with mock.patch("letsencrypt.client.acme_client.Client"):
|
||||
with mock.patch("letsencrypt.account.report_new_account"):
|
||||
self.config.email = None
|
||||
self.config.register_unsafely_without_email = True
|
||||
self._call()
|
||||
mock_logger.warn.assert_called_once_with(mock.ANY)
|
||||
|
||||
class ClientTest(unittest.TestCase):
|
||||
"""Tests for letsencrypt.client.Client."""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue