piphi-runtime-testkit-python 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,8 +86,14 @@ def _runtime_state_samples(
86
86
  for raw_sample in raw_samples:
87
87
  payload = _as_mapping(raw_sample)
88
88
  entries = payload.get("entries")
89
- if isinstance(entries, (list, tuple)):
90
- for entry in entries:
89
+ if isinstance(entries, Mapping):
90
+ entry_values = entries.values()
91
+ elif isinstance(entries, (list, tuple)):
92
+ entry_values = entries
93
+ else:
94
+ entry_values = None
95
+ if entry_values is not None:
96
+ for entry in entry_values:
91
97
  mapped_entry = _as_mapping(entry)
92
98
  append_state(mapped_entry.get("latest_state", mapped_entry))
93
99
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: piphi-runtime-testkit-python
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Pytest-first helpers for testing PiPhi runtime integrations
5
5
  Keywords: piphi,pytest,testing,runtime,iot
6
6
  Author-Email: KelvinSan <support@piphi.network>
@@ -1,10 +1,10 @@
1
- piphi_runtime_testkit_python-0.3.2.dist-info/METADATA,sha256=yoJKk1CtGv0EJeEHQtNid0zQPDvL_dfI5E_sRR9R-TQ,29685
2
- piphi_runtime_testkit_python-0.3.2.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
3
- piphi_runtime_testkit_python-0.3.2.dist-info/entry_points.txt,sha256=zTIXoQOJK3VVIMOfKpB5Y3vnSbyFgyU45GZCb7fLGHI,120
4
- piphi_runtime_testkit_python-0.3.2.dist-info/licenses/LICENSE,sha256=pS6szQI4X7qAin1ODdoDp-XwZvsFy6ZZ28-JAwGHgzo,1070
1
+ piphi_runtime_testkit_python-0.3.3.dist-info/METADATA,sha256=XqX-IsfYRcTflxIranLQdCv1JHu1wpKrmAVMoVq31r4,29685
2
+ piphi_runtime_testkit_python-0.3.3.dist-info/WHEEL,sha256=IuIk3wbaEnFH1cx75iM2R1CmliRI3dFLXTbRakgvgFQ,90
3
+ piphi_runtime_testkit_python-0.3.3.dist-info/entry_points.txt,sha256=zTIXoQOJK3VVIMOfKpB5Y3vnSbyFgyU45GZCb7fLGHI,120
4
+ piphi_runtime_testkit_python-0.3.3.dist-info/licenses/LICENSE,sha256=pS6szQI4X7qAin1ODdoDp-XwZvsFy6ZZ28-JAwGHgzo,1070
5
5
  piphi_runtime_testkit_python/__init__.py,sha256=Qx_XdzyZvbUnPmsfQCdaZflW5nGjLAu88WqPDQYP5iQ,2907
6
6
  piphi_runtime_testkit_python/assertions.py,sha256=eeGhnl0yj7u7l8_svZaaSsaM87SLyEYDfYI2FbTndFM,19778
7
- piphi_runtime_testkit_python/behavior_contract.py,sha256=QGMSa3MqzOvQ9_GWgj-7MCivVZuAO_jYewDO3Jat-ZA,12407
7
+ piphi_runtime_testkit_python/behavior_contract.py,sha256=uezJgOXAY5VoHK9aPtc8yvtd3fjW3NAfn-jyty5XJVI,12617
8
8
  piphi_runtime_testkit_python/builders.py,sha256=L0ytJ4fyQyv9QOuyXYulGBfQMhQiK8tnhbXymHdRxQM,4881
9
9
  piphi_runtime_testkit_python/camera.py,sha256=h0bKfAOuD9s8gWtVM7ONcolu_euX120DjrSH0i4p1bA,5356
10
10
  piphi_runtime_testkit_python/cross_contract.py,sha256=_cnbIKkng5wZcr5GlOW-LoTQOvQUfaeOVN2uBTYWX0E,4273
@@ -12,4 +12,4 @@ piphi_runtime_testkit_python/harness.py,sha256=Bpi0FCcOnqPCBjGDdSxWWyefle8Ub-Pfk
12
12
  piphi_runtime_testkit_python/mock_core.py,sha256=FJf2d6zJ7_ETgUk1R5CVu_O02PgJjUwZ_JBvkmzdLrc,15803
13
13
  piphi_runtime_testkit_python/pytest_plugin.py,sha256=8LUxO-2o7PZOQeMLQ2THbtfwn2HJ91vXkwGiYipmNuw,965
14
14
  piphi_runtime_testkit_python/waits.py,sha256=OROOtcg2JmBzvQMQWF2ftR9m0fcujLVuT_YykUF5g7c,1953
15
- piphi_runtime_testkit_python-0.3.2.dist-info/RECORD,,
15
+ piphi_runtime_testkit_python-0.3.3.dist-info/RECORD,,