mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 11:51:51 +02:00
Satisfy linter
This commit is contained in:
+1
-1
@@ -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:
|
||||
|
||||
+1
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user