equal
deleted
inserted
replaced
164 def test_metadata_owned_by(self): |
164 def test_metadata_owned_by(self): |
165 entity = self.add_entity('Bookmark', title=u'wf1', path=u'/view') |
165 entity = self.add_entity('Bookmark', title=u'wf1', path=u'/view') |
166 self.commit() # fire operations |
166 self.commit() # fire operations |
167 self.assertEquals(len(entity.owned_by), 1) # make sure we have only one owner |
167 self.assertEquals(len(entity.owned_by), 1) # make sure we have only one owner |
168 self.assertEquals(entity.owned_by[0].eid, self.session.user.eid) |
168 self.assertEquals(entity.owned_by[0].eid, self.session.user.eid) |
|
169 |
|
170 def test_user_login_stripped(self): |
|
171 u = self.create_user(' joe ') |
|
172 tname = self.execute('Any L WHERE E login L, E eid %(e)s', |
|
173 {'e': u.eid})[0][0] |
|
174 self.assertEquals(tname, 'joe') |
|
175 self.execute('SET X login " jijoe " WHERE X eid %(x)s', {'x': u.eid}) |
|
176 tname = self.execute('Any L WHERE E login L, E eid %(e)s', |
|
177 {'e': u.eid})[0][0] |
|
178 self.assertEquals(tname, 'jijoe') |
169 |
179 |
170 |
180 |
171 |
181 |
172 class UserGroupHooksTC(CubicWebTC): |
182 class UserGroupHooksTC(CubicWebTC): |
173 |
183 |