web/test/unittest_uicfg.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 24 Sep 2009 20:31:23 +0200
changeset 3464 99bd1ea0394a
parent 3125 52b6b8c2ccc5
child 4083 3b285889b8e9
permissions -rw-r--r--
[tests] make unittest_uicfg pass again by using the correct test class
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3464
99bd1ea0394a [tests] make unittest_uicfg pass again by using the correct test class
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 3125
diff changeset
     1
from cubicweb.devtools.testlib import CubicWebTC
3125
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     2
from cubicweb.web import uicfg
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     3
3464
99bd1ea0394a [tests] make unittest_uicfg pass again by using the correct test class
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 3125
diff changeset
     4
class UICFGTC(CubicWebTC):
3125
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     5
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     6
    def test_autoform_section_inlined(self):
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     7
        self.assertEquals(uicfg.autoform_is_inlined.etype_get('CWUser', 'use_email', 'subject', 'EmailAddress'),
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     8
                          True)
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
     9
        self.assertEquals(uicfg.autoform_section.etype_get('CWUser', 'use_email', 'subject', 'EmailAddress'),
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    10
                          'generated')
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    11
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    12
if __name__ == '__main__':
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    13
    from logilab.common.testlib import unittest_main
52b6b8c2ccc5 [uicfg, autoform] when a relation is inlined, put it in the generated section by default
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff changeset
    14
    unittest_main()