Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
e95207b9
Commit
e95207b9
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-449
: Mock DeviceProxy to avoid lofar_device trying to access itself as a client
parent
7a2747e0
No related branches found
Branches containing commit
No related tags found
1 merge request
!175
Resolve L2SS-449 "Add deviceproxy to devices"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/test/clients/test_attr_wrapper.py
+9
-0
9 additions, 0 deletions
...rol/tangostationcontrol/test/clients/test_attr_wrapper.py
with
9 additions
and
0 deletions
tangostationcontrol/tangostationcontrol/test/clients/test_attr_wrapper.py
+
9
−
0
View file @
e95207b9
...
...
@@ -13,12 +13,14 @@ from tango import DevState
from
tangostationcontrol.test.clients.test_client
import
test_client
from
tangostationcontrol.clients.attribute_wrapper
import
*
from
tangostationcontrol.devices.lofar_device
import
*
import
tangostationcontrol.devices.lofar_device
# Test imports
from
tango.test_context
import
DeviceTestContext
from
tangostationcontrol.test
import
base
import
asyncio
import
mock
scalar_dims
=
(
1
,)
spectrum_dims
=
(
4
,)
...
...
@@ -38,6 +40,13 @@ def dev_init(device):
class
TestAttributeTypes
(
base
.
TestCase
):
def
setUp
(
self
):
# Avoid the device trying to access itself as a client
self
.
deviceproxy_patch
=
mock
.
patch
.
object
(
tangostationcontrol
.
devices
.
lofar_device
,
'
DeviceProxy
'
)
self
.
deviceproxy_patch
.
start
()
def
tearDown
(
self
):
self
.
deviceproxy_patch
.
stop
()
class
str_scalar_device
(
lofar_device
):
scalar_R
=
attribute_wrapper
(
comms_annotation
=
"
str_scalar_R
"
,
datatype
=
numpy
.
str
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment