Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
c6596b0c
Commit
c6596b0c
authored
Jul 17, 2022
by
Alexander Schrode
Committed by
oroulet
Jul 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorganise test
parent
4d2a6fb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
tests/test_xml.py
tests/test_xml.py
+10
-14
No files found.
tests/test_xml.py
View file @
c6596b0c
...
...
@@ -564,6 +564,16 @@ async def test_xml_required_models_fail(opc):
async
def
test_xml_required_models_pass
(
opc
):
await
opc
.
opc
.
import_xml
(
CUSTOM_REQ_XML_PASS_PATH
)
# check if missing namespace infos are added
urn
=
"http://yourorganisation.org/testenum104/"
idx
=
await
opc
.
opc
.
register_namespace
(
urn
)
o
=
await
opc
.
opc
.
nodes
.
namespaces
.
get_child
([
f"
{
idx
}
:
{
urn
}
"
])
assert
await
(
await
o
.
get_child
(
"NamespaceUri"
)).
read_value
()
==
urn
assert
await
(
await
o
.
get_child
(
"NamespaceVersion"
)).
read_value
()
==
"1.0.0"
dt
=
await
(
await
o
.
get_child
(
"NamespacePublicationDate"
)).
read_value
()
assert
dt
.
year
==
2020
assert
dt
.
month
==
8
assert
dt
.
day
==
11
async
def
test_disable_xml_export_without_value
(
opc
,
tmpdir
):
...
...
@@ -582,17 +592,3 @@ async def test_disable_xml_export_without_value(opc, tmpdir):
assert
dv
.
Value
!=
v
.
Value
assert
v
.
Value
.
Value
is
None
await
opc
.
opc
.
delete_nodes
([
o2
])
async
def
test_if_missing_meta_data_is_added
(
opc
):
# check if missing namespace infos are added
urn
=
"http://yourorganisation.org/testenum104/"
idx
=
await
opc
.
opc
.
register_namespace
(
urn
)
await
opc
.
opc
.
import_xml
(
CUSTOM_REQ_XML_PASS_PATH
)
o
=
await
opc
.
opc
.
nodes
.
namespaces
.
get_child
([
f"
{
idx
}
:
{
urn
}
"
])
assert
await
(
await
o
.
get_child
(
"NamespaceUri"
)).
read_value
()
==
urn
assert
await
(
await
o
.
get_child
(
"NamespaceVersion"
)).
read_value
()
==
"1.0.0"
dt
=
await
(
await
o
.
get_child
(
"NamespacePublicationDate"
)).
read_value
()
assert
dt
.
year
==
2020
assert
dt
.
month
==
8
assert
dt
.
day
==
11
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