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
registration
Commits
5d0b14bb8b0a
Commit
6d167cc6
authored
Nov 19, 2014
by
David Douard
Browse files
[test] fix unittest_registration
probably due to lxml upgrade
parent
ba5d939c24de
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/unittest_registration.py
View file @
5d0b14bb
...
...
@@ -60,14 +60,14 @@ class RegistrationTC(CubicWebTC):
req
=
self
.
request
()
req
.
form
=
{
'firstname-subject'
:
u
'Toto'
}
pageinfo
=
self
.
view
(
'registration'
,
req
=
req
,
rset
=
None
)
ns
=
{
'ns'
:
pageinfo
.
default_ns
}
# check form field names
names
=
pageinfo
.
etree
.
xpath
(
'//
ns:
form[@id="registrationForm"]//
ns:
input[@type!="hidden"]/@name'
,
namespaces
=
ns
)
names
=
pageinfo
.
etree
.
xpath
(
'//form[@id="registrationForm"]//input[@type!="hidden"]/@name'
)
print
"*"
*
60
,
pageinfo
.
etree
.
__class__
self
.
assertEqual
(
set
(
names
),
set
(
self
.
data
))
# check form field value
firstname
=
pageinfo
.
etree
.
xpath
(
'//ns:input[@name="firstname-subject"]/@value'
,
namespaces
=
ns
)
firstname
=
pageinfo
.
etree
.
xpath
(
'//input[@name="firstname-subject"]/@value'
)
self
.
assertEqual
(
firstname
,
[
req
.
form
[
'firstname-subject'
]])
def
test_send_mail_ok
(
self
):
...
...
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