Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverrahner committed Jun 18, 2024
1 parent 4d5b3cb commit 0e748fe
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 98 deletions.
192 changes: 95 additions & 97 deletions tests/agrirouter/integration/test_publish_device_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,104 +70,102 @@ def _message_callback(self, client, userdata, msg):
if decoded_message.response_envelope.response_code != 201:
self._log.info("Message details: " + str(decoded_details))
assert (
decoded_message.response_envelope.response_code == 201
or
(
decoded_message.response_envelope.response_code == 400
and decoded_details.messages[0].message_code == "VAL_000004"
)
decoded_message.response_envelope.response_code == 201 or (
decoded_message.response_envelope.response_code == 400
and decoded_details.messages[0].message_code == "VAL_000004" # noqa: W503
)
)
self._callback_processed = True

_deviceDescriptionAsJson = ("{\n" +
" \"versionMajor\": \"VERSION_MAJOR_E2_DIS\",\n" +
" \"versionMinor\": 1,\n" +
" \"taskControllerManufacturer\": \"HOLMER EasyHelp 4.0\",\n" +
" \"taskControllerVersion\": \"0.0.1\",\n" +
" \"device\": [\n" +
" {\n" +
" \"deviceId\": {\n" +
" \"number\": \"-1\"\n" +
" },\n" +
" \"deviceDesignator\": \"harvester\",\n" +
" \"clientName\": \"oBCEAD3hBNI=\",\n" +
" \"deviceSerialNumber\": \"T4_4095\",\n" +
" \"deviceElement\": [\n" +
" {\n" +
" \"deviceElementId\": {\n" +
" \"number\": \"-1\"\n" +
" },\n" +
" \"deviceElementObjectId\": 100,\n" +
" \"deviceElementType\": \"C_DEVICE\",\n" +
" \"deviceElementDesignator\": \"Maschine\",\n" +
" \"deviceObjectReference\": [\n" +
" {\n" +
" \"deviceObjectId\": 10000\n" +
" },\n" +
" {\n" +
" \"deviceObjectId\": 10001\n" +
" },\n" +
" {\n" +
" \"deviceObjectId\": 10002\n" +
" },\n" +
" {\n" +
" \"deviceObjectId\": 10003\n" +
" },\n" +
" {\n" +
" \"deviceObjectId\": 10004\n" +
" }\n" +
" ]\n" +
" }\n" +
" ],\n" +
" \"deviceProcessData\": [\n" +
" {\n" +
" \"deviceProcessDataObjectId\": 10000,\n" +
" \"deviceProcessDataDdi\": 271,\n" +
" \"deviceValuePresentationObjectId\": 10000\n" +
" },\n" +
" {\n" +
" \"deviceProcessDataObjectId\": 10001,\n" +
" \"deviceProcessDataDdi\": 394,\n" +
" \"deviceValuePresentationObjectId\": 10001\n" +
" },\n" +
" {\n" +
" \"deviceProcessDataObjectId\": 10002,\n" +
" \"deviceProcessDataDdi\": 395,\n" +
" \"deviceValuePresentationObjectId\": 10002\n" +
" },\n" +
" {\n" +
" \"deviceProcessDataObjectId\": 10003,\n" +
" \"deviceProcessDataDdi\": 397,\n" +
" \"deviceValuePresentationObjectId\": 10003\n" +
" },\n" +
" {\n" +
" \"deviceProcessDataObjectId\": 10004,\n" +
" \"deviceProcessDataDdi\": 493,\n" +
" \"deviceValuePresentationObjectId\": 10004\n" +
" }\n" +
" ],\n" +
" \"deviceValuePresentation\": [\n" +
" {\n" +
" \"deviceValuePresentationObjectId\": 10000,\n" +
" \"scale\": 1.0\n" +
" },\n" +
" {\n" +
" \"deviceValuePresentationObjectId\": 10001,\n" +
" \"scale\": 1.0\n" +
" },\n" +
" {\n" +
" \"deviceValuePresentationObjectId\": 10002,\n" +
" \"scale\": 1.0\n" +
" },\n" +
" {\n" +
" \"deviceValuePresentationObjectId\": 10003,\n" +
" \"scale\": 1.0\n" +
" },\n" +
" {\n" +
" \"deviceValuePresentationObjectId\": 10004,\n" +
" \"scale\": 1.0\n" +
" }\n" +
" ]\n" +
" }\n" +
" ]\n" +
_deviceDescriptionAsJson = ("{\n"
" \"versionMajor\": \"VERSION_MAJOR_E2_DIS\",\n"
" \"versionMinor\": 1,\n"
" \"taskControllerManufacturer\": \"HOLMER EasyHelp 4.0\",\n"
" \"taskControllerVersion\": \"0.0.1\",\n"
" \"device\": [\n"
" {\n"
" \"deviceId\": {\n"
" \"number\": \"-1\"\n"
" },\n"
" \"deviceDesignator\": \"harvester\",\n"
" \"clientName\": \"oBCEAD3hBNI=\",\n"
" \"deviceSerialNumber\": \"T4_4095\",\n"
" \"deviceElement\": [\n"
" {\n"
" \"deviceElementId\": {\n"
" \"number\": \"-1\"\n"
" },\n"
" \"deviceElementObjectId\": 100,\n"
" \"deviceElementType\": \"C_DEVICE\",\n"
" \"deviceElementDesignator\": \"Maschine\",\n"
" \"deviceObjectReference\": [\n"
" {\n"
" \"deviceObjectId\": 10000\n"
" },\n"
" {\n"
" \"deviceObjectId\": 10001\n"
" },\n"
" {\n"
" \"deviceObjectId\": 10002\n"
" },\n"
" {\n"
" \"deviceObjectId\": 10003\n"
" },\n"
" {\n"
" \"deviceObjectId\": 10004\n"
" }\n"
" ]\n"
" }\n"
" ],\n"
" \"deviceProcessData\": [\n"
" {\n"
" \"deviceProcessDataObjectId\": 10000,\n"
" \"deviceProcessDataDdi\": 271,\n"
" \"deviceValuePresentationObjectId\": 10000\n"
" },\n"
" {\n"
" \"deviceProcessDataObjectId\": 10001,\n"
" \"deviceProcessDataDdi\": 394,\n"
" \"deviceValuePresentationObjectId\": 10001\n"
" },\n"
" {\n"
" \"deviceProcessDataObjectId\": 10002,\n"
" \"deviceProcessDataDdi\": 395,\n"
" \"deviceValuePresentationObjectId\": 10002\n"
" },\n"
" {\n"
" \"deviceProcessDataObjectId\": 10003,\n"
" \"deviceProcessDataDdi\": 397,\n"
" \"deviceValuePresentationObjectId\": 10003\n"
" },\n"
" {\n"
" \"deviceProcessDataObjectId\": 10004,\n"
" \"deviceProcessDataDdi\": 493,\n"
" \"deviceValuePresentationObjectId\": 10004\n"
" }\n"
" ],\n"
" \"deviceValuePresentation\": [\n"
" {\n"
" \"deviceValuePresentationObjectId\": 10000,\n"
" \"scale\": 1.0\n"
" },\n"
" {\n"
" \"deviceValuePresentationObjectId\": 10001,\n"
" \"scale\": 1.0\n"
" },\n"
" {\n"
" \"deviceValuePresentationObjectId\": 10002,\n"
" \"scale\": 1.0\n"
" },\n"
" {\n"
" \"deviceValuePresentationObjectId\": 10003,\n"
" \"scale\": 1.0\n"
" },\n"
" {\n"
" \"deviceValuePresentationObjectId\": 10004,\n"
" \"scale\": 1.0\n"
" }\n"
" ]\n"
" }\n"
" ]\n"
"}")
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,3 @@ def _callback_for_feed_delete(self, client, userdata, msg):
delete_details = DecodingService.decode_details(decoded_message.response_payload.details)
self._log.info("Details for the message removal: " + str(delete_details))
assert decoded_message.response_envelope.response_code == 201

0 comments on commit 0e748fe

Please sign in to comment.