def test_from_proto_list_returns_list_of_rawpoint(self): """ Assert from_proto_list returns list of RawPoint """ protos = [ RawPointProto(time=1, value=10), RawPointProto(time=2, value=20) ] points = RawPoint.from_proto_list(protos) assert len(points) == 2 for point in points: assert isinstance(point, RawPoint)
def test_from_proto_list(self): """ Assert from_proto_list creates valid objects """ protos = [ RawPointProto(time=1, value=10), RawPointProto(time=2, value=20) ] points = RawPoint.from_proto_list(protos) assert points[0].time == protos[0].time assert points[0].value == protos[0].value assert points[1].time == protos[1].time assert points[1].value == protos[1].value