Adding uuid in the response returned by the endpoint to get the device

pull/146/head
Matheus Lima 2019-05-21 20:39:03 -03:00
parent df128c9b47
commit c3a1d74fc3
2 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ class DeviceEndpoint(PublicEndpoint):
if device is not None:
response_data = dict(
uuid=device.id,
name=device.name,
description=device.placement,
coreVersion=device.core_version,

View File

@ -31,6 +31,7 @@ def validate_response(context):
response = context.get_device_response
assert_that(response.status_code, equal_to(HTTPStatus.OK))
device = json.loads(response.data)
assert_that(device, has_key('uuid'))
assert_that(device, has_key('name'))
assert_that(device, has_key('description'))
assert_that(device, has_key('coreVersion'))