Skip to content

Commit

Permalink
test: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenngn committed Oct 16, 2024
1 parent 9a51ed6 commit cefe597
Show file tree
Hide file tree
Showing 3 changed files with 412 additions and 414 deletions.
13 changes: 6 additions & 7 deletions capella_ros_tools/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ def to_yaml(
"""Import ROS messages into a Capella data package."""
logger.info("Generating decl YAML")

instructions = [
{"parent": decl.UUIDReference(helpers.UUIDString(root_uuid))}
| self._convert_package(self.messages),
]
needed_types = [
p for p in self._promise_id_refs if p not in self._promise_ids
]
Expand Down Expand Up @@ -242,14 +246,9 @@ def to_yaml(
},
}
)
if associations:
instructions[0]["sync"]["owned_associations"] = associations

root_package = self._convert_package(self.messages)
root_package["sync"]["owned_associations"] = associations

instructions = [
{"parent": decl.UUIDReference(helpers.UUIDString(root_uuid))}
| root_package,
]
if not needed_types:
return decl.dump(instructions)

Expand Down
Loading

0 comments on commit cefe597

Please sign in to comment.