Skip to content

Commit

Permalink
Address codacy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass committed Nov 14, 2024
1 parent fc0a6b7 commit 9f7f021
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/ocpp_tests/test_sets/everest_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def _get_public_key_hash(cls, file: Path):
)
)
# try ECDSA (Note: We assume we're working with the uncompressed-point format here)
except:
except Exception:
return cls._sha256(
certificate.public_key().public_bytes(
encoding=serialization.Encoding.X962,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import asyncio
from dataclasses import dataclass
from unittest.mock import Mock, call as mock_call, ANY, call
from unittest.mock import Mock, call as mock_call, ANY
import logging

import pytest
Expand Down Expand Up @@ -614,7 +614,7 @@ async def test_change_availability_request_connector(self, _env):

await wait_for_mock_called(
_env.probe_module_command_mocks["evse_manager"]["enable_disable"],
call=call(
call=mock_call(
{
"cmd_source": {
"enable_priority": 5000,
Expand Down Expand Up @@ -646,7 +646,7 @@ async def test_change_availability_request_connector(self, _env):

await wait_for_mock_called(
_env.probe_module_command_mocks["evse_manager_b"]["enable_disable"],
call=call(
call=mock_call(
{
"cmd_source": {
"enable_priority": 5000,
Expand All @@ -669,7 +669,7 @@ async def test_change_availability_request_evse(self, _env):
assert res == {"status": "Accepted"}
await wait_for_mock_called(
_env.probe_module_command_mocks["evse_manager"]["enable_disable"],
call=call(
call=mock_call(
{
"cmd_source": {
"enable_priority": 5000,
Expand Down
2 changes: 1 addition & 1 deletion tests/ocpp_tests/test_sets/ocpp16/smart_charging_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async def test_absolute_4(

assert await charge_point_v16.set_charging_profile_req(req) == exp_scp_result

res = await charge_point_v16.get_composite_schedule(
await charge_point_v16.get_composite_schedule(
call.GetCompositeSchedulePayload(connector_id=1, duration=300)
)

Expand Down
4 changes: 2 additions & 2 deletions tests/ocpp_tests/test_sets/ocpp201/provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from ocpp.routing import on, create_route_map
from everest.testing.ocpp_utils.fixtures import *
from everest_test_utils import * # Needs to be before the datatypes below since it overrides the v201 Action enum with the v16 one
from ocpp.v201.enums import (Action, IdTokenType as IdTokenTypeEnum, SetVariableStatusType, ConnectorStatusType,GetVariableStatusType)
from ocpp.v201.enums import (Action, SetVariableStatusType, ConnectorStatusType,GetVariableStatusType)
from validations import validate_status_notification_201, validate_notify_report_data_201, wait_for_callerror_and_validate
from everest.testing.core_utils._configuration.libocpp_configuration_helper import GenericOCPP201ConfigAdjustment
from everest.testing.ocpp_utils.charge_point_utils import wait_for_and_validate, TestUtility, OcppTestConfiguration, ValidationMode
Expand Down Expand Up @@ -626,7 +626,7 @@ async def test_TC_B_56_CS(
wait_for_bootnotification=True
)

r = await charge_point_v201.get_report_req(
await charge_point_v201.get_report_req(
request_id=2544,
component_variable=[
ComponentVariableType(
Expand Down

0 comments on commit 9f7f021

Please sign in to comment.