@mock.patch('certbot._internal.client.display_ops.get_email')
@mock.patch('certbot._internal.main.display_util.notify')
def test_no_accounts_no_email(self, mock_notify, mock_get_email):
    mock_get_email.return_value = 'example@example.com'
    with mock.patch('certbot._internal.main.client') as client:
        client.register.return_value = (self.accs[0], mock.sentinel.acme)
        self.assertEqual((self.accs[0], mock.sentinel.acme), self._call())
    client.register.assert_called_once_with(self.config, self.account_storage, tos_cb=mock.ANY)
    self.assertEqual(self.accs[0].id, self.config.account)
    self.assertEqual('example@example.com', self.config.email)
    mock_notify.assert_called_once_with('Account registered.')
@mock.patch('certbot._internal.client.display_ops.get_email')
@mock.patch('certbot._internal.main.display_util.notify')
def test_no_accounts_no_email(self, mock_notify, mock_get_email):
    mock_get_email.return_value = 'example@example.com'
    with mock.patch('certbot._internal.main.client') as client:
        client.register.return_value = (self.accs[0], mock.sentinel.acme)
        self.assertEqual((self.accs[0], mock.sentinel.acme), self._call())
    client.register.assert_called_once_with(self.config, self.account_storage, tos_cb=mock.ANY)
    self.assertEqual(self.accs[0].id, self.config.account)
    self.assertEqual('example@example.com', self.config.email)
    mock_notify.assert_called_once_with('Account registered.')