@mock.patch('certbot._internal.main._handle_unexpected_key_type_migration')
def test_handle_identical_cert_request_pending(self, mock_handle_migration):
    mock_lineage = mock.Mock()
    mock_lineage.ensure_deployed.return_value = False
    ret = main._handle_identical_cert_request(mock.Mock(), mock_lineage)
    self.assertEqual(ret, ('reinstall', mock_lineage))
    self.assertTrue(mock_handle_migration.called)
@mock.patch('certbot._internal.main._handle_unexpected_key_type_migration')
def test_handle_identical_cert_request_pending(self, mock_handle_migration):
    mock_lineage = mock.Mock()
    mock_lineage.ensure_deployed.return_value = False
    ret = main._handle_identical_cert_request(mock.Mock(), mock_lineage)
    self.assertEqual(ret, ('reinstall', mock_lineage))
    self.assertTrue(mock_handle_migration.called)