Skip to content

Commit 25535a7

Browse files
authored
Update test_charge_point.py
1 parent c06e1f4 commit 25535a7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/test_charge_point.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,27 @@ def __init__(self, id, connection, response_timeout=30):
6666
@on(Action.GetConfiguration)
6767
def on_get_configuration(self, key, **kwargs):
6868
"""Handle a get configuration requests."""
69-
if key == ConfigurationKey.supported_feature_profiles:
69+
if key[0] == ConfigurationKey.supported_feature_profiles.value:
7070
return call_result.GetConfigurationPayload(
71-
configuration_key={"key":key, "readonly": "false", "value": "Core,FirmwareManagement,SmartCharging"}
71+
configuration_key=[{"key":key[0], "readonly": "false", "value": "Core,FirmwareManagement,SmartCharging"}]
7272
)
73-
if key == ConfigurationKey.heartbeat_interval:
74-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":"300"})
75-
if key == ConfigurationKey.number_of_connectors:
76-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":"1"})
77-
if key == ConfigurationKey.web_socket_ping_interval:
78-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":"60"})
79-
if key == ConfigurationKey.meter_values_sampled_data:
73+
if key[0] == ConfigurationKey.heartbeat_interval.value:
74+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":"300"}])
75+
if key[0] == ConfigurationKey.number_of_connectors.value:
76+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":"1"}])
77+
if key[0] == ConfigurationKey.web_socket_ping_interval.value:
78+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":"60"}])
79+
if key[0] == ConfigurationKey.meter_values_sampled_data.value:
8080
return call_result.GetConfigurationPayload(
81-
configuration_key={"key":key, "readonly": "false", "value":"energy_reactive_import_register"}
81+
configuration_key=[{"key":key[0], "readonly": "false", "value":"energy_reactive_import_register"}]
8282
)
83-
if key == ConfigurationKey.meter_value_sample_interval:
84-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":"60"})
85-
if key == ConfigurationKey.charging_schedule_allowed_charging_rate_unit:
86-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":"Current"})
87-
if key == ConfigurationKey.authorize_remote_tx_requests:
88-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":"false"})
89-
return call_result.GetConfigurationPayload(configuration_key={"key":key, "readonly": "false", "value":""})
83+
if key[0] == ConfigurationKey.meter_value_sample_interval.value:
84+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":"60"}])
85+
if key[0] == ConfigurationKey.charging_schedule_allowed_charging_rate_unit.value:
86+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":"Current"}])
87+
if key[0] == ConfigurationKey.authorize_remote_tx_requests.value:
88+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":"false"}])
89+
return call_result.GetConfigurationPayload(configuration_key=[{"key":key[0], "readonly": "false", "value":""}])
9090

9191
@on(Action.ChangeConfiguration)
9292
def on_change_configuration(self, **kwargs):

0 commit comments

Comments
 (0)