mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 08:42:57 -04:00
Satisfy linter
This commit is contained in:
parent
90bbd93b05
commit
b0ee98a5c3
3 changed files with 3 additions and 6 deletions
|
|
@ -82,7 +82,7 @@ class Account(object): # pylint: disable=too-few-public-methods
|
|||
self.meta == other.meta)
|
||||
|
||||
|
||||
def report_new_account(acc, config):
|
||||
def report_new_account(config):
|
||||
"""Informs the user about their new ACME account."""
|
||||
reporter = zope.component.queryUtility(interfaces.IReporter)
|
||||
if reporter is None:
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ def register(config, account_storage, tos_cb=None):
|
|||
regr = acme.agree_to_tos(regr)
|
||||
|
||||
acc = account.Account(regr, key)
|
||||
account.report_new_account(acc, config)
|
||||
account.report_new_account(config)
|
||||
account_storage.save(acc)
|
||||
|
||||
eff.handle_subscription(config)
|
||||
|
|
|
|||
|
|
@ -62,13 +62,10 @@ class ReportNewAccountTest(unittest.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
self.config = mock.MagicMock(config_dir="/etc/letsencrypt")
|
||||
reg = messages.Registration.from_data(email="rhino@jungle.io")
|
||||
self.acc = mock.MagicMock(regr=messages.RegistrationResource(
|
||||
uri=None, new_authzr_uri=None, body=reg))
|
||||
|
||||
def _call(self):
|
||||
from certbot.account import report_new_account
|
||||
report_new_account(self.acc, self.config)
|
||||
report_new_account(self.config)
|
||||
|
||||
@mock.patch("certbot.account.zope.component.queryUtility")
|
||||
def test_no_reporter(self, mock_zope):
|
||||
|
|
|
|||
Loading…
Reference in a new issue