]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
feat(ocpp-server): add error handling, configurable params, async tests, and Python...
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 13 Mar 2026 18:53:46 +0000 (19:53 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 13 Mar 2026 18:53:46 +0000 (19:53 +0100)
commit87dd8a85cf076059df34f0fc7e56a4dff9a56004
tree5527ad0060a110d224cd07daa58d4e0aaf4ba513
parent00fd54b4fd02b00a2bb65ab782b49b58ce144a34
feat(ocpp-server): add error handling, configurable params, async tests, and Python 3.14+ compat

- Add centralized error handling in _send_command dispatch for
  TimeoutError, OCPPError, and ConnectionClosed
- Make host/port configurable via --host and --port CLI args
- Make boot notification status configurable via --boot-status
- Make TransactionEvent total cost configurable via --total-cost
- Extract server defaults as module-level constants
- Fix asyncio.iscoroutine() deprecation in timer.py: use
  inspect.iscoroutinefunction() + inspect.isawaitable() for Python 3.14+
- Add proper type annotations and docstrings to timer.py
- Add pytest-asyncio for async handler testing (82 tests total)
- Add async tests for all 15 incoming OCPP handlers
- Add error handling tests for command dispatch layer
- Add tests for configurable boot_status and total_cost
- Update README with new server and charging behavior CLI options
tests/ocpp-server/README.md
tests/ocpp-server/poetry.lock
tests/ocpp-server/pyproject.toml
tests/ocpp-server/server.py
tests/ocpp-server/test_server.py
tests/ocpp-server/timer.py