Skip to content

Commit

Permalink
Fixes for using everest-testing with Python 3.11 (#134)
Browse files Browse the repository at this point in the history
* Fix dataclass field default for python 3.11
* Properly access ocpp version enum value

Fixes central_system fixture for python 3.11

---------

Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass authored Apr 22, 2024
1 parent 2d7ea3e commit 16c3681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def start(self, ssl_context=None):
self.on_connect,
'0.0.0.0',
self.port,
subprotocols=[self.ocpp_version],
subprotocols=[self.ocpp_version.value],
ssl=ssl_context
)
if self.port is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import time
import asyncio
from enum import Enum
from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Optional

from ocpp.messages import unpack
Expand Down Expand Up @@ -57,7 +57,7 @@ class OcppTestConfiguration:
csms_tls_verify_client_certificate: bool = False
csms_port: str = 9000
csms_host: str = "127.0.0.1"
charge_point_info: ChargePointInfo = ChargePointInfo()
charge_point_info: ChargePointInfo = field(default_factory=ChargePointInfo)
config_path: Optional[Path] = None
authorization_info: Optional[AuthorizationInfo] = None
certificate_info: Optional[CertificateInfo] = None
Expand Down

0 comments on commit 16c3681

Please sign in to comment.