Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
93246b45
Commit
93246b45
authored
3 years ago
by
Taya Snijder
Browse files
Options
Downloads
Patches
Plain Diff
changed
parent
eec59660
No related branches found
No related tags found
1 merge request
!359
Resolve L2SS-679 "Initial pdu support"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py
+1
-9
1 addition, 9 deletions
...trol/tangostationcontrol/test/clients/test_snmp_client.py
with
1 addition
and
9 deletions
tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py
+
1
−
9
View file @
93246b45
...
@@ -170,18 +170,10 @@ class TestSNMP(base.TestCase):
...
@@ -170,18 +170,10 @@ class TestSNMP(base.TestCase):
hlapi
.
ObjectType
=
obj_type
hlapi
.
ObjectType
=
obj_type
snmp_attr
=
snmp_attribute
(
comm
=
m_comms
,
mib
=
"
test
"
,
name
=
"
test
"
,
idx
=
0
,
dtype
=
server
.
SNMP_TO_NUMPY_DICT
[
i
],
dim_x
=
server
.
DIM_LIST
[
j
][
0
],
dim_y
=
server
.
DIM_LIST
[
j
][
1
])
snmp_attr
=
snmp_attribute
(
comm
=
m_comms
,
mib
=
"
test
"
,
name
=
"
test
"
,
idx
=
0
,
dtype
=
server
.
SNMP_TO_NUMPY_DICT
[
i
],
dim_x
=
server
.
DIM_LIST
[
j
][
0
],
dim_y
=
server
.
DIM_LIST
[
j
][
1
])
res_lst
=
[]
res_lst
=
[]
def
m_ObjectType
(
*
value
):
"""
This function mocks the ObjectType class and taps off the value its given.
"""
res_lst
.
append
(
value
[
1
])
return
None
,
None
,
None
,
server
.
get_return_val
(
i
,
server
.
DIM_LIST
[
j
])
# set hlapi.ObjectType to the mocked m_ObjectType function
# set hlapi.ObjectType to the mocked m_ObjectType function
hlapi
.
ObjectType
=
m_ObjectType
hlapi
.
ObjectType
=
loop_test
# call the write function. This function should now call m_ObjectType itself.
# call the write function. This function should now call m_ObjectType itself.
snmp_attr
.
write_function
(
set_val
)
snmp_attr
.
write_function
(
set_val
)
...
...
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