135 self.assertEqual(e.name(), u'bouah') |
135 self.assertEqual(e.name(), u'bouah') |
136 e.cw_set(surname=u'lôt') |
136 e.cw_set(surname=u'lôt') |
137 self.assertEqual(e.dc_title(), 'member') |
137 self.assertEqual(e.dc_title(), 'member') |
138 self.assertEqual(e.name(), u'bouah lôt') |
138 self.assertEqual(e.name(), u'bouah lôt') |
139 |
139 |
|
140 def test_falsey_dc_title(self): |
|
141 with self.admin_access.repo_cnx() as cnx: |
|
142 e = cnx.create_entity('Company', order=0, name=u'pythonian') |
|
143 cnx.commit() |
|
144 self.assertEqual(u'0', e.dc_title()) |
|
145 |
140 def test_allowed_massmail_keys(self): |
146 def test_allowed_massmail_keys(self): |
141 with self.admin_access.repo_cnx() as cnx: |
147 with self.admin_access.repo_cnx() as cnx: |
142 e = cnx.execute('CWUser U WHERE U login "member"').get_entity(0, 0) |
148 e = cnx.execute('CWUser U WHERE U login "member"').get_entity(0, 0) |
143 # Bytes/Password attributes should be omited |
149 # Bytes/Password attributes should be omitted |
144 self.assertEqual(e.cw_adapt_to('IEmailable').allowed_massmail_keys(), |
150 self.assertEqual(e.cw_adapt_to('IEmailable').allowed_massmail_keys(), |
145 set(('surname', 'firstname', 'login', 'last_login_time', |
151 set(('surname', 'firstname', 'login', 'last_login_time', |
146 'creation_date', 'modification_date', 'cwuri', 'eid')) |
152 'creation_date', 'modification_date', 'cwuri', 'eid')) |
147 ) |
153 ) |
148 |
154 |