[Product-Developers] Testing collective.contentleadimage

Tom Gross itconsense at gmail.com
Thu Aug 4 09:56:13 UTC 2011


Hi

I have written a product which depends on collective.contentleadimage 
via a genericsetup dependency. Running the unittests of my product gives 
the following error:

Traceback (most recent call last):
   File 
"/home/tom/workspace/eggs/zope.testing-3.8.3-py2.4.egg/zope/testing/testrunner/runner.py", 
line 364, in run_layer
     setup_layer(options, layer, setup_layers)
   File 
"/home/tom/workspace/eggs/zope.testing-3.8.3-py2.4.egg/zope/testing/testrunner/runner.py", 
line 629, in setup_layer
     layer.setUp()
   File 
"/home/tom/workspace/eggs/Products.PloneTestCase-0.9.13-py2.4.egg/Products/PloneTestCase/layer.py", 
line 33, in setUp
     func(*args, **kw)
   File 
"/home/tom/workspace/eggs/Products.PloneTestCase-0.9.13-py2.4.egg/Products/PloneTestCase/setup.py", 
line 169, in setupPloneSite
     base_profile, extension_profiles).run()
   File 
"/home/tom/workspace/eggs/Products.PloneTestCase-0.9.13-py2.4.egg/Products/PloneTestCase/setup.py", 
line 220, in run
     self._setupHomeFolder()
   File 
"/home/tom/workspace/eggs/Products.PloneTestCase-0.9.13-py2.4.egg/Products/PloneTestCase/setup.py", 
line 326, in _setupHomeFolder
     self._commit()
   File 
"/home/tom/workspace/eggs/Products.PloneTestCase-0.9.13-py2.4.egg/Products/PloneTestCase/setup.py", 
line 369, in _commit
     transaction.commit()
   File 
"/home/tom/workspace/eggs/ZODB3-3.8.6-py2.4-linux-x86_64.egg/transaction/_manager.py", 
line 93, in commit
     return self.get().commit()
   File 
"/home/tom/workspace/eggs/ZODB3-3.8.6-py2.4-linux-x86_64.egg/transaction/_transaction.py", 
line 325, in commit
     self._commitResources()
   File 
"/home/tom/workspace/eggs/ZODB3-3.8.6-py2.4-linux-x86_64.egg/transaction/_transaction.py", 
line 424, in _commitResources
     rm.commit(self)
   File 
"/home/tom/workspace/eggs/ZODB3-3.8.6-py2.4-linux-x86_64.egg/ZODB/Connection.py", 
line 545, in commit
     self._commit(transaction)
   File 
"/home/tom/workspace/eggs/ZODB3-3.8.6-py2.4-linux-x86_64.egg/ZODB/Connection.py", 
line 590, in _commit
     self._store_objects(ObjectWriter(obj), transaction)
   File 
"/home/tom/workspace/eggs/ZODB3-3.8.6-py2.4-linux-x86_64.egg/ZODB/Connection.py", 
line 628, in _store_objects
     raise Unsupported(
Unsupported: Storing Blobs in <ZODB.DemoStorage.DemoStorage instance at 
0x27f2a28> is not supported.

Uncommenting the dependency works as expected. Is there

a) a way of disabeling the Blob-storage of collective.contentleadimage 
while unittesting

or

b) a way to conditionally include a dependency via generic setup

or

c) a solution a haven't thought of?

Thanks
-Tom



-- 
Author of the book "Plone 3 Multimedia" - http://amzn.to/dtrp0C

Tom Gross
email..........tom at toms-projekte.de
skype.....................tom_gross
web.........http://toms-projekte.de
blog...http://blog.toms-projekte.de



More information about the Product-Developers mailing list