@mock.patch('certbot._internal.renewal.should_renew')
def test_renew_skips_recent_certs(self, should_renew):
    should_renew.return_value = False
    test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf')
    expiry = (datetime.datetime.now() + datetime.timedelta(days=90))
    (_, _, stdout) = self._test_renewal_common(False, extra_args=None, should_renew=False, args=['renew'], expiry_date=expiry)
    self.assertTrue(('No renewals were attempted.' in stdout.getvalue()))
    self.assertTrue(('The following certificates are not due for renewal yet:' in stdout.getvalue()))
@mock.patch('certbot._internal.renewal.should_renew')
def test_renew_skips_recent_certs(self, should_renew):
    should_renew.return_value = False
    test_util.make_lineage(self.config.config_dir, 'sample-renewal.conf')
    expiry = (datetime.datetime.now() + datetime.timedelta(days=90))
    (_, _, stdout) = self._test_renewal_common(False, extra_args=None, should_renew=False, args=['renew'], expiry_date=expiry)
    self.assertTrue(('No renewals were attempted.' in stdout.getvalue()))
    self.assertTrue(('The following certificates are not due for renewal yet:' in stdout.getvalue()))