Skip to content

Commit

Permalink
Merge pull request #1199 from liuyd96/minor_fix
Browse files Browse the repository at this point in the history
Fix run_driver_tests.py UnicodeDecodeError
  • Loading branch information
gharveymn authored Feb 7, 2024
2 parents fcc57bd + ddcc7c1 commit f82eaec
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "|")
build_motion_status_message(mock_device, "\x7C")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.battery.battery(100)))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.inactive()))
Expand All @@ -85,7 +85,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "~")
build_motion_status_message(mock_device, "\x7E")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.battery.battery(100)))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.active()))
Expand All @@ -99,7 +99,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "X")
build_motion_status_message(mock_device, "\x58")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.battery.battery(70)))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.inactive()))
Expand All @@ -113,7 +113,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "Z")
build_motion_status_message(mock_device, "\x5A")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.battery.battery(70)))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.active()))
Expand All @@ -127,7 +127,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "½")
build_motion_status_message(mock_device, "\xBD")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.inactive()))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.signalStrength.lqi(50)))
Expand All @@ -140,7 +140,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "¿")
build_motion_status_message(mock_device, "\xBF")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.active()))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.signalStrength.lqi(50)))
Expand All @@ -153,7 +153,7 @@ test.register_coroutine_test(
function()
test.socket.zigbee:__queue_receive({
mock_device.id,
build_motion_status_message(mock_device, "0")
build_motion_status_message(mock_device, "\x30")
})
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.battery.battery(0)))
test.socket.capability:__expect_send(mock_device:generate_test_message("main", capabilities.motionSensor.motion.inactive()))
Expand All @@ -172,4 +172,4 @@ test.register_coroutine_test(
end
)

test.run_registered_tests()
test.run_registered_tests()

0 comments on commit f82eaec

Please sign in to comment.