Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
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
calibration
pycalibration
Commits
f9167b6b
Commit
f9167b6b
authored
3 years ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
fix dates in test to be adaptive for test pdus
parent
e62c3dbe
No related branches found
No related tags found
1 merge request
!483
Fix/ CI failing tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_cal_tools.py
+5
-3
5 additions, 3 deletions
tests/test_cal_tools.py
with
5 additions
and
3 deletions
tests/test_cal_tools.py
+
5
−
3
View file @
f9167b6b
...
@@ -55,13 +55,15 @@ cal_db_interface = "tcp://max-exfl017:8020"
...
@@ -55,13 +55,15 @@ cal_db_interface = "tcp://max-exfl017:8020"
def
test_get_pdu_from_db
():
def
test_get_pdu_from_db
():
snapshot_at
=
datetime
.
now
().
strftime
(
'
%Y-%m-%d %H:%M:%S%z
'
)
# A karabo_da str returns a list of one element.
# A karabo_da str returns a list of one element.
pdu_dict
=
get_pdu_from_db
(
karabo_id
=
"
TEST_DET_CI-2
"
,
pdu_dict
=
get_pdu_from_db
(
karabo_id
=
"
TEST_DET_CI-2
"
,
karabo_da
=
"
TEST_DAQ_DA_01
"
,
karabo_da
=
"
TEST_DAQ_DA_01
"
,
constant
=
constant
,
constant
=
constant
,
condition
=
condition
,
condition
=
condition
,
cal_db_interface
=
cal_db_interface
,
cal_db_interface
=
cal_db_interface
,
snapshot_at
=
"
2021-03-01 09:44:00+00:00
"
,
snapshot_at
=
snapshot_at
,
timeout
=
30000
)
timeout
=
30000
)
assert
len
(
pdu_dict
)
==
1
assert
len
(
pdu_dict
)
==
1
assert
pdu_dict
[
0
]
==
'
PHYSICAL_DETECTOR_UNIT-1_DO_NOT_DELETE
'
assert
pdu_dict
[
0
]
==
'
PHYSICAL_DETECTOR_UNIT-1_DO_NOT_DELETE
'
...
@@ -73,7 +75,7 @@ def test_get_pdu_from_db():
...
@@ -73,7 +75,7 @@ def test_get_pdu_from_db():
constant
=
constant
,
constant
=
constant
,
condition
=
condition
,
condition
=
condition
,
cal_db_interface
=
cal_db_interface
,
cal_db_interface
=
cal_db_interface
,
snapshot_at
=
"
2021-03-01 09:44:00+00:00
"
,
snapshot_at
=
snapshot_at
,
timeout
=
30000
)
timeout
=
30000
)
assert
pdu_dict
==
[
'
PHYSICAL_DETECTOR_UNIT-1_DO_NOT_DELETE
'
,
assert
pdu_dict
==
[
'
PHYSICAL_DETECTOR_UNIT-1_DO_NOT_DELETE
'
,
...
@@ -86,7 +88,7 @@ def test_get_pdu_from_db():
...
@@ -86,7 +88,7 @@ def test_get_pdu_from_db():
constant
=
constant
,
constant
=
constant
,
condition
=
condition
,
condition
=
condition
,
cal_db_interface
=
"
tcp://max-exfl017:8020
"
,
cal_db_interface
=
"
tcp://max-exfl017:8020
"
,
snapshot_at
=
"
2021-03-01 09:44:00+00:00
"
,
snapshot_at
=
snapshot_at
,
timeout
=
30000
)
timeout
=
30000
)
assert
len
(
pdu_dict
)
==
3
assert
len
(
pdu_dict
)
==
3
...
...
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