def _call(self): # pylint: disable=protected-access from letsencrypt.cli import _determine_account with mock.patch("letsencrypt.cli.account.AccountFileStorage") as mock_storage: mock_storage.return_value = self.account_storage return _determine_account(self.args, self.config)
def _call(self): # pylint: disable=protected-access from letsencrypt.cli import _determine_account with mock.patch( 'letsencrypt.cli.account.AccountFileStorage') as mock_storage: mock_storage.return_value = self.account_storage return _determine_account(self.args, self.config)
def init_le_client(args, config, authenticator, installer): if authenticator is not None: # if authenticator was given, then we will need account... acc, acme = _determine_account(args, config) logger.debug("Picked account: %r", acc) # XXX # crypto_util.validate_key_csr(acc.key) else: acc, acme = None, None return KeyClient(config, acc, authenticator, installer, acme=acme)