From 8fe113d7ae764df93daaa7a69c6fe810b6703587 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 2 Jul 2024 22:10:29 +0200 Subject: [PATCH] fix(ocpp-server): randomize GetBaseReport request id MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/ocpp-server/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ocpp-server/server.py b/tests/ocpp-server/server.py index 483c750f..17e328a6 100644 --- a/tests/ocpp-server/server.py +++ b/tests/ocpp-server/server.py @@ -3,6 +3,7 @@ import asyncio import logging from datetime import datetime, timezone from functools import partial +from random import randint from typing import Optional import ocpp.v201 @@ -108,7 +109,8 @@ class ChargePoint(ocpp.v201.ChargePoint): async def _send_get_base_report(self): request = ocpp.v201.call.GetBaseReport( - request_id=1, report_base=ReportBaseType.full_inventory + request_id=randint(1, 100), # noqa: S311 + report_base=ReportBaseType.full_inventory, ) response = await self.call(request) -- 2.34.1