diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b5c238d1..e05bb06d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,6 @@ # Change log - [#583](https://github.com/mobilityhouse/ocpp/issues/583) OCPP v1.6/v2.0.1 deprecate dataclasses from calls and call results with the suffix 'Payload' -- [#591](https://github.com/mobilityhouse/ocpp/issues/591) Camel_to_snake_case doesn't handle v2x correctly ## 0.26.0 (2024-01-17) diff --git a/ocpp/charge_point.py b/ocpp/charge_point.py index e23fbf50d..4d7cb9676 100644 --- a/ocpp/charge_point.py +++ b/ocpp/charge_point.py @@ -25,7 +25,6 @@ def camel_to_snake_case(data): if isinstance(data, dict): snake_case_dict = {} for key, value in data.items(): - key = key.replace("V2X", "_v2x") s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", key) key = re.sub("([a-z0-9])([A-Z])(?=\\S)", r"\1_\2", s1).lower() diff --git a/tests/test_charge_point.py b/tests/test_charge_point.py index e8d71c3fd..897fabc2b 100644 --- a/tests/test_charge_point.py +++ b/tests/test_charge_point.py @@ -58,8 +58,6 @@ def heartbeat(self, **kwargs): [ ({"transactionId": "74563478"}, {"transaction_id": "74563478"}), ({"fullSoC": 100}, {"full_soc": 100}), - ({"evMinV2XEnergyRequest": 200}, {"ev_min_v2x_energy_request": 200}), - ({"v2xChargingCtrlr": 200}, {"v2x_charging_ctrlr": 200}), ], ) def test_camel_to_snake_case(test_input, expected):