Skip to content

Commit

Permalink
実際のROS msgの形式で辞書内、辞書に余分なkeyがあった際の、テストに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
imoted committed Jul 27, 2022
1 parent 53d891d commit bf3e2ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ros_awsiot_agent/test/test_message_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,12 @@ def test_unexpected_key_in_dict1(self):
self.assertEqual(inst, inst2)

def test_unexpected_key_in_dict2(self):
rostype = "nav_msgs/GridCells"
rostype = "actionlib_msgs/GoalStatus"
inst = ros_loader.get_message_instance(rostype)
inst.cells = [ros_loader.get_message_instance("geometry_msgs/Point") for i in range(100)]

msg = c.extract_values(inst)
self.do_test(msg, rostype)
msg["unexpected_key"] = dict()
msg["unexpected_key"]["unexpected_key"] = "unexpected_val"
msg["goal_id"]["unexpected_key"] = "unexpected_val"

inst2 = ros_loader.get_message_instance(rostype)
c.populate_instance(msg, inst2)
Expand Down

0 comments on commit bf3e2ef

Please sign in to comment.