Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to use Call and CallResult without the suffix Payload #593

Closed
Jared-Newell-Mobility opened this issue Feb 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Jared-Newell-Mobility
Copy link
Contributor

Jared-Newell-Mobility commented Feb 5, 2024

test_charge_point.py::test_remove_nones
v16/test_v16_charge_point.py::test_call_with_unique_id_should_return_same_id
v16/test_v16_charge_point.py::test_call_without_unique_id_should_return_a_random_value
  /home/jared/PycharmProjects/ocpp/ocpp/v16/call.py:653: UserWarning: BootNotificationPayload is deprecated, use instead BootNotification
    warnings.warn(

test_charge_point.py::test_nested_remove_nones
  /home/jared/PycharmProjects/ocpp/ocpp/v201/call.py:1200: UserWarning: SetNetworkProfilePayload is deprecated, use instead SetNetworkProfile
    warnings.warn(

test_charge_point.py::test_nested_list_remove_nones
  /home/jared/PycharmProjects/ocpp/ocpp/v16/call.py:718: UserWarning: MeterValuesPayload is deprecated, use instead MeterValues
    warnings.warn(

test_charge_point.py::test_remove_nones_with_list_of_strings
  /home/jared/PycharmProjects/ocpp/ocpp/v16/call.py:428: UserWarning: GetConfigurationPayload is deprecated, use instead GetConfiguration
    warnings.warn(

test_charge_point.py::test_call_unique_id_added_to_handler_args_correctly
v16/test_v16_charge_point.py::test_route_message_with_existing_route
v16/test_v16_charge_point.py::test_route_message_without_validation
v16/test_v16_charge_point.py::test_call_with_unique_id_should_return_same_id
v16/test_v16_charge_point.py::test_call_without_unique_id_should_return_a_random_value
  /home/jared/PycharmProjects/ocpp/ocpp/v16/call_result.py:279: UserWarning: BootNotificationPayload is deprecated, use instead BootNotification
    warnings.warn(

v16/test_v16_charge_point.py::test_send_call_with_timeout
v16/test_v16_charge_point.py::test_send_invalid_call
  /home/jared/PycharmProjects/ocpp/ocpp/v16/call.py:545: UserWarning: ResetPayload is deprecated, use instead Reset
    warnings.warn(

v16/test_v16_charge_point.py::test_raise_call_error
v16/test_v16_charge_point.py::test_suppress_call_error
  /home/jared/PycharmProjects/ocpp/ocpp/v16/call.py:363: UserWarning: ClearCachePayload is deprecated, use instead ClearCache
    warnings.warn(

v201/test_v201_charge_point.py::test_route_message_with_existing_route
v201/test_v201_charge_point.py::test_call_with_unique_id_should_return_same_id
v201/test_v201_charge_point.py::test_call_without_unique_id_should_return_a_random_value
  /home/jared/PycharmProjects/ocpp/ocpp/v201/call_result.py:443: UserWarning: BootNotificationPayload is deprecated, use instead BootNotification
    warnings.warn(

v201/test_v201_charge_point.py::test_call_with_unique_id_should_return_same_id
v201/test_v201_charge_point.py::test_call_without_unique_id_should_return_a_random_value
  /home/jared/PycharmProjects/ocpp/ocpp/v201/call.py:511: UserWarning: BootNotificationPayload is deprecated, use instead BootNotification
    warnings.warn(
@Jared-Newell-Mobility
Copy link
Contributor Author

Jared-Newell-Mobility commented Feb 5, 2024

Also a bug found ocpp/charge_point/call

ocpp/ocpp/charge_point.py

Lines 314 to 318 in ae02ede

call = Call(
unique_id=unique_id,
action=payload.__class__.__name__[:-7],
payload=remove_nones(camel_case_payload),
)

action_name = payload.__class__.__name__
# Due to deprecated call and callresults, remove in the future.
if "Payload" in payload.__class__.__name__:
    action_name = payload.__class__.__name__[:-7]

@Jared-Newell-Mobility
Copy link
Contributor Author

Merged so closing

Jared-Newell-Mobility added a commit that referenced this issue Feb 14, 2024
## 1.0.0-rc.1 (2024-02-14)

- [#573](#573) Introduce
Experimental Module For v2.1
- [#547](#547) Feat: Handle
recursively serializing a dataclasses as a dictionary Thanks
[@MacDue](https://github.com/MacDue)
- [#601](#601) Fix case
conversion for soc in non "State of Charge" context
- [#523](#523) The
serialisation of soc to SoC should not occur in camel case if it is
existing at the beginning of a field
- [#515](#515) Update
Readthedocs configuration
- [#602](#602) Correct v2g
serialisation/deserialisation
- [#557](#557) OCPP 2.0.1
Wrong data type in CostUpdated total_cost
- [#564](#564) Add support
For Python 3.11 and 3.12
- [#583](#583) OCPP
v1.6/v2.0.1 deprecate dataclasses from calls and call results with the
suffix 'Payload'
- [#590](#336)
snake_to_camel_case url to URL does not get converted correctly
- [#591](#591)
Camel_to_snake_case doesn't handle v2x correctly
- [#593](#593) Update tests
to use Call and CallResult without the suffix Payload
- [#435](#435) Typo in
CostUpdated Action
- [#577](#577) v2.0.1
AttributeType Enum Corrections
- [#340](#340) 2.0.1
dataclasses have a incorrect types that don't match carnality
- [#519](#519) Typo in
v201.enums.StatusInfoReasonType.invaild_schedule
- [#510](#510) v2.0.1
UnitOfMeasureType - Enums missing and update docstring to allow use for
variableCharacteristics
- [#508](#508) Exception -
OccurrenceConstraintViolationError doc string correction

## DEPRECATED ##
- [#599](#599) v1.6 Action
Enum members corrected IMPORTANT SEE UPGRADE PATH
[#599](#599)
- [#579](#579) v2.0.1 Action
enums corrected - IMPORTANT SEE UPGRADE PATH
[#579](#579)

## BREAKING ##
- [#574](#574) Remove v1.6
deprecated enum members - IMPORTANT see upgrade path
[#574](#574)
- [#498](#498) Remove
support for OCPP 2.0 - IMPORTANT SEE UPGRADE PATH
[#498](#498)
RoaringDev1203 added a commit to RoaringDev1203/Cratus-OCPP that referenced this issue Aug 27, 2024
RoaringDev1203 added a commit to RoaringDev1203/Cratus-OCPP that referenced this issue Aug 27, 2024
## 1.0.0-rc.1 (2024-02-14)

- [#573](mobilityhouse/ocpp#573) Introduce
Experimental Module For v2.1
- [#547](mobilityhouse/ocpp#547) Feat: Handle
recursively serializing a dataclasses as a dictionary Thanks
[@MacDue](https://github.com/MacDue)
- [#601](mobilityhouse/ocpp#601) Fix case
conversion for soc in non "State of Charge" context
- [#523](mobilityhouse/ocpp#523) The
serialisation of soc to SoC should not occur in camel case if it is
existing at the beginning of a field
- [#515](mobilityhouse/ocpp#515) Update
Readthedocs configuration
- [#602](mobilityhouse/ocpp#602) Correct v2g
serialisation/deserialisation
- [#557](mobilityhouse/ocpp#557) OCPP 2.0.1
Wrong data type in CostUpdated total_cost
- [#564](mobilityhouse/ocpp#564) Add support
For Python 3.11 and 3.12
- [#583](mobilityhouse/ocpp#583) OCPP
v1.6/v2.0.1 deprecate dataclasses from calls and call results with the
suffix 'Payload'
- [#590](mobilityhouse/ocpp#336)
snake_to_camel_case url to URL does not get converted correctly
- [#591](mobilityhouse/ocpp#591)
Camel_to_snake_case doesn't handle v2x correctly
- [#593](mobilityhouse/ocpp#593) Update tests
to use Call and CallResult without the suffix Payload
- [#435](mobilityhouse/ocpp#435) Typo in
CostUpdated Action
- [#577](mobilityhouse/ocpp#577) v2.0.1
AttributeType Enum Corrections
- [#340](mobilityhouse/ocpp#340) 2.0.1
dataclasses have a incorrect types that don't match carnality
- [#519](mobilityhouse/ocpp#519) Typo in
v201.enums.StatusInfoReasonType.invaild_schedule
- [#510](mobilityhouse/ocpp#510) v2.0.1
UnitOfMeasureType - Enums missing and update docstring to allow use for
variableCharacteristics
- [#508](mobilityhouse/ocpp#508) Exception -
OccurrenceConstraintViolationError doc string correction

## DEPRECATED ##
- [#599](mobilityhouse/ocpp#599) v1.6 Action
Enum members corrected IMPORTANT SEE UPGRADE PATH
[#599](mobilityhouse/ocpp#599)
- [#579](mobilityhouse/ocpp#579) v2.0.1 Action
enums corrected - IMPORTANT SEE UPGRADE PATH
[#579](mobilityhouse/ocpp#579)

## BREAKING ##
- [#574](mobilityhouse/ocpp#574) Remove v1.6
deprecated enum members - IMPORTANT see upgrade path
[#574](mobilityhouse/ocpp#574)
- [#498](mobilityhouse/ocpp#498) Remove
support for OCPP 2.0 - IMPORTANT SEE UPGRADE PATH
[#498](mobilityhouse/ocpp#498)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant