Commit 86349841 authored by kzangeli's avatar kzangeli
Browse files

AssertionUtils: keep develop's ContextSourceIdentity check (064_01) next to...

AssertionUtils: keep develop's ContextSourceIdentity check (064_01) next to the temporal pagination keywords
parent b72bd8a9
Loading
Loading
Loading
Loading
+13 −0
Changes for resources/AssertionUtils.resource: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -887,3 +887,16 @@ Check Temporal Pagination Link Absent
    [Arguments]    ${headers}    ${rel}
    ${link}=    Get From Dictionary    ${headers}    Link    default=${EMPTY}
    Should Not Contain    ${link}    rel="${rel}"

Check Response Body Containing ContextSourceIdentity element
    [Documentation]    Check a ContextSourceIdentity (TS 104 175 clause 5.2.6.5.6)
    [Arguments]    ${response_body}
    Should Match Regexp    ${response_body['id']}    ^[A-Za-z][A-Za-z0-9+.-]*:\\S+$
    Should Be Equal    ${response_body['type']}    ContextSourceIdentity
    Should Not Be Empty    ${response_body['contextSourceAlias']}
    Should Match Regexp
    ...    ${response_body['contextSourceUptime']}
    ...    ^P(?!$)(\\d+(\\.\\d+)?Y)?(\\d+(\\.\\d+)?M)?(\\d+(\\.\\d+)?W)?(\\d+(\\.\\d+)?D)?(T(?=\\d)(\\d+(\\.\\d+)?H)?(\\d+(\\.\\d+)?M)?(\\d+(\\.\\d+)?S)?)?$
    Should Match Regexp
    ...    ${response_body['contextSourceTimeAt']}
    ...    ^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$