Skip to content

Commit 8b61772

Browse files
committed
get tests passing again
1 parent fa23d29 commit 8b61772

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/update_handlers/pva_update_handler_test.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def test_update_handler_publishes_enum_update_f142(context, producer, pv_source_
6161
)
6262
)
6363

64-
# The assertions below assume that an ep01 and un00 message is sent after the f142
65-
assert len(producer.published_payloads) == 3
66-
pv_update_output = deserialise_f142(producer.published_payloads[-3])
64+
# The assertions below assume that an ep01 message is sent after the f142
65+
assert len(producer.published_payloads) == 2
66+
pv_update_output = deserialise_f142(producer.published_payloads[-2])
6767
assert np.allclose(pv_update_output.value, pv_index)
6868
assert pv_update_output.source_name == pv_source_name
6969

@@ -81,9 +81,9 @@ def test_update_handler_publishes_enum_update_f144(context, producer, pv_source_
8181
)
8282
)
8383

84-
# The assertions below assume that an ep01 and a un00 message is sent after the f142 and al00
85-
assert len(producer.published_payloads) == 4
86-
pv_update_output = deserialise_f144(producer.published_payloads[-4])
84+
# The assertions below assume that an ep01 message is sent after the f142 and al00
85+
assert len(producer.published_payloads) == 3
86+
pv_update_output = deserialise_f144(producer.published_payloads[-3])
8787
assert np.allclose(pv_update_output.value, pv_index)
8888
assert pv_update_output.source_name == pv_source_name
8989

@@ -118,9 +118,9 @@ def test_update_handler_publishes_scalar_update_f142(
118118
NTScalar(pv_type, valueAlarm=True).wrap(pv_value, timestamp=pv_timestamp_s)
119119
)
120120

121-
# The assertions below assume that an ep01 and a un00 message is sent after the f142
122-
assert len(producer.published_payloads) == 3
123-
pv_update_output = deserialise_f142(producer.published_payloads[-3])
121+
# The assertions below assume that an ep01 message is sent after the f142
122+
assert len(producer.published_payloads) == 2
123+
pv_update_output = deserialise_f142(producer.published_payloads[-2])
124124
assert np.allclose(pv_update_output.value, pv_value)
125125
assert pv_update_output.source_name == pv_source_name
126126

@@ -155,9 +155,9 @@ def test_update_handler_publishes_scalar_update_f144(
155155
NTScalar(pv_type, valueAlarm=True).wrap(pv_value, timestamp=pv_timestamp_s)
156156
)
157157

158-
# The assertions below assume that an ep01 and a un00 message is sent after the f142
159-
assert len(producer.published_payloads) == 4
160-
pv_update_output = deserialise_f144(producer.published_payloads[-4])
158+
# The assertions below assume that an ep01 message is sent after the f142
159+
assert len(producer.published_payloads) == 3
160+
pv_update_output = deserialise_f144(producer.published_payloads[-3])
161161
assert np.allclose(pv_update_output.value, pv_value)
162162
assert pv_update_output.source_name == pv_source_name
163163

@@ -187,9 +187,9 @@ def test_update_handler_publishes_alarm_update_f142(context, producer, pv_source
187187
)
188188
)
189189

190-
# The assertions below assume that an ep01 and a un00 message is sent after the f142
191-
assert len(producer.published_payloads) == 3
192-
pv_update_output = deserialise_f142(producer.published_payloads[-3])
190+
# The assertions below assume that an ep01 message is sent after the f142
191+
assert len(producer.published_payloads) == 2
192+
pv_update_output = deserialise_f142(producer.published_payloads[-2])
193193
assert pv_update_output.source_name == pv_source_name
194194
assert pv_update_output.alarm_status == f142_AlarmStatus.HIGH # type: ignore
195195
assert pv_update_output.alarm_severity == f142_AlarmSeverity.MINOR # type: ignore
@@ -305,8 +305,8 @@ def test_update_handler_publishes_periodic_update_f142(
305305
)
306306

307307
# The assertions below assume that an ep01 message is sent after the f142
308-
assert len(producer.published_payloads) == 3
309-
pv_update_output = deserialise_f142(producer.published_payloads[-3])
308+
assert len(producer.published_payloads) == 2
309+
pv_update_output = deserialise_f142(producer.published_payloads[-2])
310310
assert np.allclose(pv_update_output.value, pv_value)
311311
assert pv_update_output.source_name == pv_source_name
312312

0 commit comments

Comments
 (0)