How to use the ocpp.v16.enums.Action function in ocpp

To help you get started, we’ve selected a few ocpp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mobilityhouse / ocpp / tests / test_messages.py View on Github external
def test_call_result_representation():
    call = CallResult(
        unique_id="1", action=Action.Authorize, payload={"status": "Accepted"}
    )

    assert str(call) == \
        ""
github mobilityhouse / ocpp / tests / test_routing.py View on Github external
def meter_values(self):
            pass

        def undecorated(self):
            pass

    cp = ChargePoint()
    route_map = create_route_map(cp)

    assert route_map == {
        Action.Heartbeat: {
            '_on_action': cp.on_heartbeat,
            '_after_action': cp.after_heartbeat,
            '_skip_schema_validation': True,
        },
        Action.MeterValues: {
            '_on_action': cp.meter_values,
            '_skip_schema_validation': False,
        },