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
seda
Commits
a6f4370d6f6e
Commit
16a7f7be
authored
Jun 13, 2016
by
Sylvain Thénault
Browse files
[test] Test the case of XSD generation using intermediary type
e.g. for union of date and dateTime types.
parent
1c9076d1878c
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_profile_generation.py
View file @
a6f4370d
...
...
@@ -401,6 +401,16 @@ class SEDAXSDExportFuncTC(XmlTestMixin, CubicWebTC):
'//xs:element[@name="Keyword"]'
'//xs:attribute[@name="id" and @use="optional"]'
)
self
.
assertEqual
(
len
(
references
),
1
)
# ensure custodial item content type is properly serialized
chi
=
self
.
xpath
(
profile
,
'//xs:element[@name="CustodialHistoryItem"]'
)
self
.
assertEqual
(
len
(
chi
),
1
)
self
.
assertXSDAttributes
(
chi
[
0
],
[{
'name'
:
'when'
,
'use'
:
'optional'
,
'type'
:
'datedateTime'
}])
ddt
=
self
.
xpath
(
profile
,
'//xs:simpleType[@name="datedateTime"]'
)
self
.
assertEqual
(
len
(
ddt
),
1
)
self
.
assertEqual
(
ddt
[
0
][
0
].
tag
,
'{http://www.w3.org/2001/XMLSchema}union'
)
self
.
assertEqual
(
ddt
[
0
][
0
].
attrib
,
{
'memberTypes'
:
'xsd:date xsd:dateTime'
})
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
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