Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
email
Commits
b83c950879a4
Commit
373dec5b
authored
Jul 27, 2010
by
Sylvain Thénault
Browse files
3.9 api update
parent
b90aeef77297
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/unittest_hooks.py
View file @
b83c9508
...
...
@@ -59,7 +59,7 @@ class ChangeStateHooksTC(CubicWebTC):
userstate
=
self
.
execute
(
'Any SN WHERE X in_state S, S name SN, X eid %(x)s'
,
{
'x'
:
u
.
eid
},
'x'
)[
0
][
0
]
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
):
self
.
execute
(
'SET U use_email E WHERE U login "anon"'
)
...
...
@@ -74,7 +74,7 @@ class ChangeStateHooksTC(CubicWebTC):
userstate
=
self
.
execute
(
'Any SN WHERE X in_state S, S name SN, X eid %(x)s'
,
{
'x'
:
u
.
eid
},
'x'
)[
0
][
0
]
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
):
ueid
=
self
.
execute
(
'INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G '
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment