Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
ikaratass committed Oct 12, 2022
1 parent 6536756 commit 6137fc9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion iso15118/secc/states/iso15118_2_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
SessionStopReq,
SessionStopRes,
WeldingDetectionReq,
WeldingDetectionRes, get_msg_type,
WeldingDetectionRes,
get_msg_type,
)
from iso15118.shared.messages.iso15118_2.datatypes import (
ACEVSEChargeParameter,
Expand Down
14 changes: 7 additions & 7 deletions tests/iso15118_20/secc/test_iso15118_20_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
from iso15118.secc.controller.simulator import SimEVSEController
from iso15118.secc.states.iso15118_20_states import ServiceDetail
from iso15118.shared.messages.enums import EnergyTransferModeEnum, Protocol, ServiceV20
from iso15118.shared.messages.iso15118_20.common_messages import MatchedService, \
ServiceList, Service
from iso15118.shared.messages.iso15118_20.common_messages import (
MatchedService,
Service,
ServiceList,
)
from iso15118.shared.messages.iso15118_20.common_types import ResponseCode
from iso15118.shared.notifications import StopNotification
from tests.dinspec.secc.test_dinspec_secc_states import MockWriter
Expand Down Expand Up @@ -36,7 +39,7 @@ def _comm_session(self):
],
)
async def test_service_detail_service_id_is_in_offered_list(
self, service_id_input, response_code
self, service_id_input, response_code
):
# [V2G20-464] The message "ServiceDetailRes" shall contain the
# ResponseCode "FAILED_ServiceIDInvalid" if the ServiceID contained
Expand Down Expand Up @@ -67,8 +70,5 @@ async def test_service_detail_service_id_is_in_offered_list(
await service_details.process_message(
message=get_v2g_message_service_detail_req(service_id_input)
)
assert (
service_details.message.response_code is
response_code
)
assert service_details.message.response_code is response_code
assert isinstance(self.comm_session.current_state, ServiceDetail)
4 changes: 2 additions & 2 deletions tests/iso15118_20/secc/test_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from tests.tools import MOCK_SESSION_ID


def get_v2g_message_service_detail_req(service_list:int) -> ServiceDetailReq:
def get_v2g_message_service_detail_req(service_list: int) -> ServiceDetailReq:
return ServiceDetailReq(
header=MessageHeader(
session_id=MOCK_SESSION_ID,
timestamp=time.time(),
),
service_id=service_list
service_id=service_list,
)
5 changes: 3 additions & 2 deletions tests/secc/states/test_iso15118_2_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ async def test_service_detail_service_id_is_in_offered_list(self):
],
)
async def test_service_detail_service_id_is_in_offered_list(
self, service_id, response_code):
self, service_id, response_code
):
self.comm_session.selected_auth_option = AuthEnum.PNC_V2
self.comm_session.config.free_charging_service = False
self.comm_session.writer = Mock()
Expand All @@ -458,4 +459,4 @@ async def test_service_detail_service_id_is_in_offered_list(
assert (
service_details.message.body.service_detail_res.response_code
is response_code
)
)

0 comments on commit 6137fc9

Please sign in to comment.