def setUp(self):
    super().setUp()
    shutil.copy(CERT_PATH, self.tempdir)
    self.tmp_cert_path = os.path.abspath(os.path.join(self.tempdir, 'cert_512.pem'))
    patches = [mock.patch('acme.client.BackwardsCompatibleClientV2'), mock.patch('certbot._internal.client.Client'), mock.patch('certbot._internal.main._determine_account'), mock.patch('certbot._internal.main.display_ops.success_revocation')]
    self.mock_acme_client = patches[0].start()
    patches[1].start()
    self.mock_determine_account = patches[2].start()
    self.mock_success_revoke = patches[3].start()
    for patch in patches:
        self.addCleanup(patch.stop)
    from certbot._internal.account import Account
    self.regr = mock.MagicMock()
    self.meta = Account.Meta(creation_host='test.certbot.org', creation_dt=datetime.datetime(2015, 7, 4, 14, 4, 10, tzinfo=pytz.UTC))
    self.acc = Account(self.regr, JWK, self.meta)
    self.mock_determine_account.return_value = (self.acc, None)
def setUp(self):
    super().setUp()
    shutil.copy(CERT_PATH, self.tempdir)
    self.tmp_cert_path = os.path.abspath(os.path.join(self.tempdir, 'cert_512.pem'))
    patches = [mock.patch('acme.client.BackwardsCompatibleClientV2'), mock.patch('certbot._internal.client.Client'), mock.patch('certbot._internal.main._determine_account'), mock.patch('certbot._internal.main.display_ops.success_revocation')]
    self.mock_acme_client = patches[0].start()
    patches[1].start()
    self.mock_determine_account = patches[2].start()
    self.mock_success_revoke = patches[3].start()
    for patch in patches:
        self.addCleanup(patch.stop)
    from certbot._internal.account import Account
    self.regr = mock.MagicMock()
    self.meta = Account.Meta(creation_host='test.certbot.org', creation_dt=datetime.datetime(2015, 7, 4, 14, 4, 10, tzinfo=pytz.UTC))
    self.acc = Account(self.regr, JWK, self.meta)
    self.mock_determine_account.return_value = (self.acc, None)