Commit 373dec5b authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

3.9 api update

parent b90aeef77297
...@@ -59,7 +59,7 @@ class ChangeStateHooksTC(CubicWebTC): ...@@ -59,7 +59,7 @@ class ChangeStateHooksTC(CubicWebTC):
userstate = self.execute('Any SN WHERE X in_state S, S name SN, X eid %(x)s', userstate = self.execute('Any SN WHERE X in_state S, S name SN, X eid %(x)s',
{'x': u.eid}, 'x')[0][0] {'x': u.eid}, 'x')[0][0]
self.assertEquals(userstate, 'deactivated') self.assertEquals(userstate, 'deactivated')
self.assertEquals(u.latest_trinfo().creator.login, 'admin') self.assertEquals(u.cw_adapt_to('IWorkflowable').latest_trinfo().creator.login, 'admin')
def test_email_change_state_trinfo_owner(self): def test_email_change_state_trinfo_owner(self):
self.execute('SET U use_email E WHERE U login "anon"') self.execute('SET U use_email E WHERE U login "anon"')
...@@ -74,7 +74,7 @@ class ChangeStateHooksTC(CubicWebTC): ...@@ -74,7 +74,7 @@ class ChangeStateHooksTC(CubicWebTC):
userstate = self.execute('Any SN WHERE X in_state S, S name SN, X eid %(x)s', userstate = self.execute('Any SN WHERE X in_state S, S name SN, X eid %(x)s',
{'x': u.eid}, 'x')[0][0] {'x': u.eid}, 'x')[0][0]
self.assertEquals(userstate, 'deactivated') self.assertEquals(userstate, 'deactivated')
self.assertEquals(u.latest_trinfo().creator.login, 'anon') self.assertEquals(u.cw_adapt_to('IWorkflowable').latest_trinfo().creator.login, 'anon')
def test_email_change_state_wrong_eid(self): def test_email_change_state_wrong_eid(self):
ueid = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G ' ueid = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G '
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment