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
30b2c19f
Commit
30b2c19f
authored
Apr 20, 2019
by
oroulet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix applicaiton_uri handling in tests
parent
ccf78073
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
asyncua/client/client.py
asyncua/client/client.py
+1
-1
asyncua/server/server.py
asyncua/server/server.py
+3
-0
tests/test_server.py
tests/test_server.py
+3
-3
No files found.
asyncua/client/client.py
View file @
30b2c19f
...
...
@@ -268,7 +268,7 @@ class Client:
if discovery_configuration is provided, the newer register_server2 service call is used
"""
serv
=
ua
.
RegisteredServer
()
serv
.
ServerUri
=
server
.
application_uri
serv
.
ServerUri
=
server
.
get_application_uri
()
serv
.
ProductUri
=
server
.
product_uri
serv
.
DiscoveryUrls
=
[
server
.
endpoint
.
geturl
()]
serv
.
ServerType
=
server
.
application_type
...
...
asyncua/server/server.py
View file @
30b2c19f
...
...
@@ -126,6 +126,9 @@ class Server:
"""
self
.
iserver
.
disabled_clock
=
val
def
get_application_uri
(
self
):
return
self
.
_application_uri
async
def
set_application_uri
(
self
,
uri
:
str
):
"""
Set application/server URI.
...
...
tests/test_server.py
View file @
30b2c19f
...
...
@@ -23,7 +23,7 @@ async def test_discovery(server, discovery_server):
async
with
client
:
servers
=
await
client
.
find_servers
()
new_app_uri
=
'urn:freeopcua:python:server:test_discovery'
server
.
application_uri
=
new_app_uri
await
server
.
set_application_uri
(
new_app_uri
)
await
server
.
register_to_discovery
(
discovery_server
.
endpoint
.
geturl
(),
0
)
# let server register registration
await
asyncio
.
sleep
(
0.1
)
...
...
@@ -38,10 +38,10 @@ async def test_find_servers2(server, discovery_server):
async
with
client
:
servers
=
await
client
.
find_servers
()
new_app_uri1
=
'urn:freeopcua:python:server:test_discovery1'
server
.
application_uri
=
new_app_uri1
await
server
.
set_application_uri
(
new_app_uri1
)
await
server
.
register_to_discovery
(
discovery_server
.
endpoint
.
geturl
(),
period
=
0
)
new_app_uri2
=
'urn:freeopcua:python:test_discovery2'
server
.
application_uri
=
new_app_uri2
await
server
.
set_application_uri
(
new_app_uri2
)
await
server
.
register_to_discovery
(
discovery_server
.
endpoint
.
geturl
(),
period
=
0
)
await
asyncio
.
sleep
(
0.1
)
# let server register registration
new_servers
=
await
client
.
find_servers
()
...
...
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