Commit b83668e7 authored by Julien Muchembled's avatar Julien Muchembled

qa: update a test for recent ZConfig

parent 6153a752
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
import unittest import unittest
from contextlib import contextmanager from contextlib import contextmanager
from ZConfig import ConfigurationSyntaxError from ZConfig import ConfigurationError
from ZODB.config import databaseFromString from ZODB.config import databaseFromString
from .. import Patch from .. import Patch
from . import ClientApplication, NEOThreadedTest, with_cluster from . import ClientApplication, NEOThreadedTest, with_cluster
...@@ -53,7 +53,8 @@ class ConfigTests(NEOThreadedTest): ...@@ -53,7 +53,8 @@ class ConfigTests(NEOThreadedTest):
kw = self.dummy_required.copy() kw = self.dummy_required.copy()
valid = ['false', 'true', 'zlib', 'zlib=9'] valid = ['false', 'true', 'zlib', 'zlib=9']
for kw['compress'] in '9', 'best', 'zlib=0', 'zlib=100': for kw['compress'] in '9', 'best', 'zlib=0', 'zlib=100':
self.assertRaises(ConfigurationSyntaxError, databaseFromDict, **kw) # BBB: DataConversionError since ZConfig 3.4.0
self.assertRaises(ConfigurationError, databaseFromDict, **kw)
for compress in valid: for compress in valid:
with self._db(cluster, compress=compress) as db: with self._db(cluster, compress=compress) as db:
self.assertEqual((0,0,''), db.storage.app.compress('')) self.assertEqual((0,0,''), db.storage.app.compress(''))
......
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