This fixes a test case issue when some of the data might not be
available during the test, yet. The test expects the second value to be
JFloat but that fails because get_rates return an int in that case.
Signed-off-by: Boris Ranto <branto@redhat.com>
:rtype: list[tuple[int, float]]"""
data = mgr.get_counter(svc_type, svc_name, path)[path]
if not data:
- return [(0, 0)]
+ return [(0, 0.0)]
elif len(data) == 1:
- return [(data[0][0], 0)]
+ return [(data[0][0], 0.0)]
return [(data2[0], differentiate(data1, data2)) for data1, data2 in pairwise(data)]
@classmethod