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
ae98a12d
Commit
ae98a12d
authored
Oct 12, 2016
by
olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test export import description
parent
2e20a1bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tests/tests_xml.py
tests/tests_xml.py
+4
-1
No files found.
tests/tests_xml.py
View file @
ae98a12d
...
...
@@ -35,7 +35,7 @@ class XmlTests(object):
input_arg
=
o
.
get_data_value
().
Value
.
Value
[
0
]
self
.
assertEqual
(
input_arg
.
Name
,
'Context'
)
def
test_xml_
export
(
self
):
def
test_xml_
method
(
self
):
o
=
self
.
opc
.
nodes
.
objects
.
add_object
(
2
,
"xmlexportobj"
)
m
=
o
.
add_method
(
2
,
"callme"
,
func
,
[
ua
.
VariantType
.
Double
,
ua
.
VariantType
.
String
],
[
ua
.
VariantType
.
Float
])
v
=
o
.
add_variable
(
3
,
"myxmlvar"
,
6.78
,
ua
.
VariantType
.
Float
)
...
...
@@ -46,6 +46,8 @@ class XmlTests(object):
inputs
=
m
.
get_child
(
"InputArguments"
)
val
=
inputs
.
get_value
()
val
[
0
].
ArrayDimensions
=
[
2
,
2
]
desc
=
b"My nce description"
val
[
0
].
Description
=
ua
.
LocalizedText
(
desc
)
inputs
.
set_value
(
val
)
#get all nodes and export
...
...
@@ -61,6 +63,7 @@ class XmlTests(object):
val
=
inputs
.
get_value
()
self
.
assertEqual
(
len
(
val
),
2
)
self
.
assertEqual
(
val
[
0
].
ArrayDimensions
,
[
2
,
2
])
self
.
assertEqual
(
val
[
0
].
Description
.
Text
,
desc
)
self
.
assertEqual
(
v
.
get_value
(),
6.78
)
self
.
assertEqual
(
v
.
get_data_type
(),
ua
.
NodeId
(
ua
.
ObjectIds
.
Float
))
...
...
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