web/test/unittest_uicfg.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 31 Mar 2010 14:46:04 +0200
branchstable
changeset 5115 2e43ef618d14
parent 4997 aed7bdb9da54
child 5421 8167de96c523
permissions -rw-r--r--
[repository] forbid usage of set_attributes() in before_add_entity set_attributes() will generate a RQL query that will silently fail. An explicit error is better. You can still use the ``entity[attr] = value`` notation that won't generate a SQL query but still update the inner state of the entity and its edited_attributes attribute.

from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.web import uicfg

abaa = uicfg.actionbox_appearsin_addmenu

class UICFGTC(CubicWebTC):

    def test_default_actionbox_appearsin_addmenu_config(self):
        self.failIf(abaa.etype_get('TrInfo', 'wf_info_for', 'object', 'CWUser'))

if __name__ == '__main__':
    from logilab.common.testlib import unittest_main
    unittest_main()