Satisfy linter

This commit is contained in:
Chad Whitacre 2017-02-13 09:04:15 -05:00
parent 90bbd93b05
commit b0ee98a5c3
3 changed files with 3 additions and 6 deletions

View file

@ -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:

View file

@ -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)

View file

@ -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):