Update tests/ocpp-server/server.py
[e-mobility-charging-stations-simulator.git] / tests / ocpp-server / server.py
index f05e80f4d6be3758cda03ab640aca4e4d1cf3be4..aa424b7f90c6d89b30a25fb66e1b32be5a5d7671 100644 (file)
@@ -149,7 +149,7 @@ async def send_ocpp_command(cp, command_name, delay=None, period=None):
     if period:
         async def send_command_repeatedly():
             while True:
-                command_name = await charge_point.receive_command()
+                command_name = await cp.receive_command()
                 try:
                     match command_name:
                         case Action.ClearCache:
@@ -157,7 +157,7 @@ async def send_ocpp_command(cp, command_name, delay=None, period=None):
                             await charge_point.send_clear_cache()
                         case Action.GetBaseReport:
                             logging.info("GetBaseReport parser working")
-                            await charge_point.send_get_base_report()
+                            await cp.send_get_base_report()
                         case _:
                             logging.warning(f"Unsupported command {command_name}")
                 except Exception as e: