32 # see custom configuration in views.cwuser |
32 # see custom configuration in views.cwuser |
33 self.assertEquals(rbc(e, 'primary'), |
33 self.assertEquals(rbc(e, 'primary'), |
34 [('login', 'subject'), |
34 [('login', 'subject'), |
35 ('upassword', 'subject'), |
35 ('upassword', 'subject'), |
36 ('in_group', 'subject'), |
36 ('in_group', 'subject'), |
37 ('in_state', 'subject'), |
|
38 ('eid', 'subject'), |
37 ('eid', 'subject'), |
39 ]) |
38 ]) |
40 self.assertListEquals(rbc(e, 'secondary'), |
39 self.assertListEquals(rbc(e, 'secondary'), |
41 [('firstname', 'subject'), |
40 [('firstname', 'subject'), |
42 ('surname', 'subject') |
41 ('surname', 'subject') |
57 ('checked_by', 'object'), |
56 ('checked_by', 'object'), |
58 ]) |
57 ]) |
59 # owned_by is defined both as subject and object relations on CWUser |
58 # owned_by is defined both as subject and object relations on CWUser |
60 self.assertListEquals(rbc(e, 'generated'), |
59 self.assertListEquals(rbc(e, 'generated'), |
61 [('use_email', 'subject'), |
60 [('use_email', 'subject'), |
|
61 ('in_state', 'subject'), |
62 ('has_text', 'subject'), |
62 ('has_text', 'subject'), |
63 ('identity', 'subject'), |
63 ('identity', 'subject'), |
64 ('is', 'subject'), |
64 ('is', 'subject'), |
65 ('is_instance_of', 'subject'), |
65 ('is_instance_of', 'subject'), |
66 ('tags', 'object'), |
66 ('tags', 'object'), |
150 |
150 |
151 def test_automatic_inline_edit_formview(self): |
151 def test_automatic_inline_edit_formview(self): |
152 geid = self.execute('CWGroup X LIMIT 1')[0][0] |
152 geid = self.execute('CWGroup X LIMIT 1')[0][0] |
153 rset = self.execute('CWUser X LIMIT 1') |
153 rset = self.execute('CWUser X LIMIT 1') |
154 self.view('inline-edition', rset, row=0, col=0, rtype='in_group', |
154 self.view('inline-edition', rset, row=0, col=0, rtype='in_group', |
155 peid=geid, role='subject', template=None, i18nctx='').source |
155 peid=geid, role='object', template=None, i18nctx='').source |
156 |
156 |
157 def test_automatic_inline_creation_formview(self): |
157 def test_automatic_inline_creation_formview(self): |
158 geid = self.execute('CWGroup X LIMIT 1')[0][0] |
158 geid = self.execute('CWGroup X LIMIT 1')[0][0] |
159 self.view('inline-creation', None, etype='CWUser', rtype='in_group', |
159 self.view('inline-creation', None, etype='CWUser', rtype='in_group', |
160 peid=geid, template=None, i18nctx='', role='subject').source |
160 peid=geid, template=None, i18nctx='', role='object').source |
161 |
161 |
162 |
162 |
163 if __name__ == '__main__': |
163 if __name__ == '__main__': |
164 unittest_main() |
164 unittest_main() |
165 |
165 |