开发者

Weird issue testing a propertysheet

In vs.flexigridsearch I have a test for checking if the add-on related propertysheet is installed and all its properties.

http://svn.plone.org/svn/collective/vs.flexigridsearch/trunk/vs/flexigridsearch/tests/test_flexigrid.py

The first check if flexigridsearch_prope开发者_如何学运维rties is available works:

self.assertEqual('flexigridsearch_properties' in pprops.objectIds(), True)

All further checks on for properties inside the propertysheet fail because the propertysheet is empty:

self.assertEqual('portalTypesToSearch' in fs_props, True)

The propertysheet is defined through GenericSetup:

http://svn.plone.org/svn/collective/vs.flexigridsearch/trunk/vs/flexigridsearch/profiles/default/propertiestool.xml

So adding the propertysheet through the fixture seems to work but the properties are not added. No idea why... However it works perfectly when I add the add-on through add/remove programs inside Plone site setup.

Any idea why this is failing in testing environment (Plone 4.0.5)?


Stupid me.

One has to use

sheet.propertyIds() 

instead of

sheet.objectIds()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜