Commit ae0c7be8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

New ZODB uses zodbpickle instead of cPickle.

parent 5daa4ea7
...@@ -26,10 +26,7 @@ ...@@ -26,10 +26,7 @@
# #
############################################################################## ##############################################################################
try: from zodbpickle.pickle import PicklingError
from ZODB._compat import cPickle
except ImportError: # BBB: ZODB < 4
import cPickle
import unittest import unittest
import sys import sys
import mock import mock
...@@ -330,7 +327,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -330,7 +327,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
portal.person_module._setObject(o.getId(), aq_base(o)) portal.person_module._setObject(o.getId(), aq_base(o))
try: try:
self.commit() self.commit()
except cPickle.PicklingError: except PicklingError:
self.abort() self.abort()
else: else:
self.fail("No exception raised when storing explicitly a temp object" self.fail("No exception raised when storing explicitly a temp object"
......
...@@ -26,11 +26,7 @@ ...@@ -26,11 +26,7 @@
# #
############################################################################## ##############################################################################
try: from zodbpickle.pickle import PicklingError
from ZODB._compat import cPickle
PicklingError = cPickle.PicklingError
except ImportError: # BBB: ZODB < 4
from six.moves.cPickle import PicklingError
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as \ from Products.ERP5Type.Accessor.Constant import PropertyGetter as \
PropertyConstantGetter PropertyConstantGetter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment