Skip to content

Commit 34bd29a

Browse files
committed
update tests
1 parent c663431 commit 34bd29a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/test_robot.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
from viam.resource.registry import Registry
5050
from viam.resource.rpc_client_base import ResourceRPCClientBase
5151
from viam.resource.types import RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, RESOURCE_TYPE_SERVICE
52-
from viam.robot.client import RobotClient
52+
from viam.robot.client import RobotClient, CloudMetadata
5353
from viam.robot.service import RobotService
5454
from viam.services.motion.client import MotionClient
5555
from viam.utils import dict_to_struct, message_to_struct, struct_to_message
@@ -143,9 +143,11 @@
143143
OPERATIONS_RESPONSE = [Operation(id=OPERATION_ID)]
144144

145145
GET_CLOUD_METADATA_RESPONSE = GetCloudMetadataResponse(
146-
robot_part_id="the-robot-part",
146+
robot_part_id="the-machine-id",
147147
primary_org_id="the-primary-org",
148148
location_id="the-location",
149+
machine_id="the-machine-id",
150+
machine_part_id="the-machine-part-id",
149151
)
150152

151153

@@ -426,7 +428,12 @@ async def test_get_cloud_metadata(self, service: RobotService):
426428
async with ChannelFor([service]) as channel:
427429
client = await RobotClient.with_channel(channel, RobotClient.Options())
428430
md = await client.get_cloud_metadata()
429-
assert md == GET_CLOUD_METADATA_RESPONSE
431+
assert md == CloudMetadata(
432+
primary_org_id=GET_CLOUD_METADATA_RESPONSE.primary_org_id,
433+
location_id=GET_CLOUD_METADATA_RESPONSE.location_id,
434+
machine_id=GET_CLOUD_METADATA_RESPONSE.machine_id,
435+
machine_part_id=GET_CLOUD_METADATA_RESPONSE.machine_part_id,
436+
)
430437
await client.close()
431438

432439
@pytest.mark.asyncio

0 commit comments

Comments
 (0)