[Documentation]Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/subscriptions/{subscriptionId})
[Tags]cb
@@ -51,7 +53,8 @@ ${teatype}= Vehicle
${request}${response}=Retrieve Subscription${id}
Check Response Status Code200${response['status']}
Check Response Body Containing One Subscription element${subscription_expectation}${response['body']}
Check Request Containing Accept Header Set To${request}application/json, */*
Check Response Headers Containing Content-Type set to${response}${content_type}
Check Response Headers Link Not Empty${response}
[Teardown]Delete Subscription${id}
@@ -65,10 +68,11 @@ ${teatype}= Vehicle
${request}${response}=Create Context Source Registration With Return${updated_payload}
Check Response Status Code201${response['status']}
${request}${response}=Query Context Source Registrations With Returnid=${registration_id}type=${registration_type}
${request}${response}=Query Context Source Registrations With Returnid=${registration_id}type=${registration_type}context=${ngsild_test_suite_context}
Check Response Status Code200${response['status']}
Check Response Body Containing One Registration element${registration_expectation}${response['body']}
Check Request Containing Accept Header Set To${request}application/json, */*
Check Response Headers Containing Content-Type set to${response}${content_type}
${temporal_entity_representation_id}=Generate Random Entity Id${tea_id_prefix}
Create Temporal Representation Of Entity${tea_filename}${temporal_entity_representation_id}
${request}${response}=Query Temporal Representation Of Entities With Returnentity_types=${teatype}timerel=aftertimeAt=2020-08-01T12:05:00Z
${request}${response}=Query Temporal Representation Of Entities With Returnentity_types=${teatype}timerel=aftertimeAt=2020-08-01T12:05:00Zcontext=${ngsild_test_suite_context}
Check Response Status Code200${response['status']}
Set Test Variable${response}
Check Response Body Containing EntityTemporal element${tea_expectation}${temporal_entity_representation_id}
Check Request Containing Accept Header Set To${request}application/json, */*
Check Response Headers Containing Content-Type set to${response}${content_type}
Check Response Headers Link Not Empty${response}
[Teardown]Delete Temporal Representation Of Entity${temporal_entity_representation_id}
[Documentation]Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /entities/{entityId}/attrs/{attrId})
${temporal_entity_representation_id}=Generate Random Entity Id${tea_id_prefix}
${response}=Create Or Update Temporal Representation Of Entity Selecting Content Type${temporal_entity_representation_id}${tea_filename}${EMPTY}
${response}=Create Or Update Temporal Representation Of Entity Selecting Content Type${temporal_entity_representation_id}${tea_filename}${content_type}
Check Response Status Code415${response['status']}
[Teardown]Delete Temporal Representation Of Entity${temporal_entity_representation_id}
[Documentation]Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceRegistrations/)
${request}${response}=Query Context Source Registrations With Returntype=Buildingaccept=${accept}
Check Response Status Code${status_code}${response['status']}
044_04_04_endpoint get /csourceSubscriptions/
[Documentation]Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/)