web/test/unittest_uicfg.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 13 Nov 2009 10:47:26 +0100
branchstable
changeset 3838 9cc134372bf8
parent 3125 52b6b8c2ccc5
child 3464 99bd1ea0394a
permissions -rw-r--r--
[web] safety belt to avoid overriding pageid with loadxhtml() HtmlHeaders.define_var() now accepts a third optional 'override' paramater. If set to False, the variable won't be evaluated if it's already defined in the page.

from cubicweb.devtools.apptest import EnvBasedTC
from cubicweb.web import uicfg

class UICFGTC(EnvBasedTC):

    def test_autoform_section_inlined(self):
        self.assertEquals(uicfg.autoform_is_inlined.etype_get('CWUser', 'use_email', 'subject', 'EmailAddress'),
                          True)
        self.assertEquals(uicfg.autoform_section.etype_get('CWUser', 'use_email', 'subject', 'EmailAddress'),
                          'generated')

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