Adding uuid in the response returned by the endpoint to get the device
parent
df128c9b47
commit
c3a1d74fc3
|
@ -28,6 +28,7 @@ class DeviceEndpoint(PublicEndpoint):
|
||||||
|
|
||||||
if device is not None:
|
if device is not None:
|
||||||
response_data = dict(
|
response_data = dict(
|
||||||
|
uuid=device.id,
|
||||||
name=device.name,
|
name=device.name,
|
||||||
description=device.placement,
|
description=device.placement,
|
||||||
coreVersion=device.core_version,
|
coreVersion=device.core_version,
|
||||||
|
|
|
@ -31,6 +31,7 @@ def validate_response(context):
|
||||||
response = context.get_device_response
|
response = context.get_device_response
|
||||||
assert_that(response.status_code, equal_to(HTTPStatus.OK))
|
assert_that(response.status_code, equal_to(HTTPStatus.OK))
|
||||||
device = json.loads(response.data)
|
device = json.loads(response.data)
|
||||||
|
assert_that(device, has_key('uuid'))
|
||||||
assert_that(device, has_key('name'))
|
assert_that(device, has_key('name'))
|
||||||
assert_that(device, has_key('description'))
|
assert_that(device, has_key('description'))
|
||||||
assert_that(device, has_key('coreVersion'))
|
assert_that(device, has_key('coreVersion'))
|
||||||
|
|
Loading…
Reference in New Issue