Skip to content

Commit

Permalink
Changes based on comments
Browse files Browse the repository at this point in the history
Signed-off-by: AssemblyJohn <[email protected]>
  • Loading branch information
AssemblyJohn committed Nov 25, 2024
1 parent dac16ce commit 31b0421
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions everest-testing/src/everest/testing/ocpp_utils/central_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ def __init__(self, chargepoint_id, ocpp_version, port: Optional[int] = None):
self.name = "CentralSystem"
self.port = port
self.chargepoint_id = chargepoint_id
self.ocpp_version = ocpp_version
self.ws_server = None
self.chargepoint = None
self.chargepoint_set_event = asyncio.Event()
self.function_overrides = []
self.ocpp_version = ocpp_version

Check notice on line 36 in everest-testing/src/everest/testing/ocpp_utils/central_system.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

everest-testing/src/everest/testing/ocpp_utils/central_system.py#L36

Trailing whitespace

Check notice on line 37 in everest-testing/src/everest/testing/ocpp_utils/central_system.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

everest-testing/src/everest/testing/ocpp_utils/central_system.py#L37

Trailing whitespace
@abstractmethod
async def on_connect(self, websocket, path):
Expand All @@ -52,15 +48,17 @@ async def wait_for_chargepoint(self, timeout=30, wait_for_bootnotification=True)
async def start(self, ssl_context=None):
logging.error("'CentralSystem' did not implement 'start'!")

Check notice on line 49 in everest-testing/src/everest/testing/ocpp_utils/central_system.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

everest-testing/src/everest/testing/ocpp_utils/central_system.py#L49

Trailing whitespace

pass # End CentralSystem

class LocalCentralSystem(CentralSystem):
"""Wrapper for CSMS websocket server. Holds a reference to a single connected chargepoint
"""

def __init__(self, chargepoint_id, ocpp_version, port: Optional[int] = None):

Check notice on line 55 in everest-testing/src/everest/testing/ocpp_utils/central_system.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

everest-testing/src/everest/testing/ocpp_utils/central_system.py#L55

Trailing whitespace
super().__init__(chargepoint_id, ocpp_version, port)
self.name = "LocalCentralSystem"
self.ws_server = None
self.chargepoint = None
self.chargepoint_set_event = asyncio.Event()
self.function_overrides = []

async def on_connect(self, websocket, path):
""" For every new charge point that connects, create a ChargePoint
Expand Down Expand Up @@ -158,9 +156,6 @@ async def start(self, ssl_context=None):

self.ws_server.close()
await self.ws_server.wait_closed()
pass # End LocalCentralSystem




def inject_csms_v201_mock(cs: CentralSystem) -> Mock:
Expand Down

0 comments on commit 31b0421

Please sign in to comment.