author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> |
Mon, 04 Jan 2010 18:58:35 +0100 | |
branch | stable |
changeset 4206 | cebdf8ee5ad7 |
parent 3125 | 52b6b8c2ccc5 |
child 3464 | 99bd1ea0394a |
permissions | -rw-r--r-- |
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
|
1 |
from cubicweb.devtools.apptest import EnvBasedTC |
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 |
|
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
|
4 |
class UICFGTC(EnvBasedTC): |
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() |