Commit b65b46ba authored by thomas Bousselin's avatar thomas Bousselin
Browse files

fix: csr test not expecting default values for operation/mode and expecting location

parent 6fbc58ec
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -30,7 +30,6 @@ Delete A Context Source
    [Arguments]    ${invalid_registration_id}    ${expected_status_code}    ${problem_type}
    [Arguments]    ${invalid_registration_id}    ${expected_status_code}    ${problem_type}
    ${response}=    Delete Context Source Registration With Return    ${invalid_registration_id}
    ${response}=    Delete Context Source Registration With Return    ${invalid_registration_id}
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    Check Response Body Is Empty    ${response}
    IF    "${problem_type}"!="${EMPTY}"
    IF    "${problem_type}"!="${EMPTY}"
        Check Response Body Containing ProblemDetails Element Containing Type Element set to
        Check Response Body Containing ProblemDetails Element Containing Type Element set to
        ...    ${response.json()}
        ...    ${response.json()}
+1 −28
Original line number Original line Diff line number Diff line
@@ -38,33 +38,6 @@
        ]
        ]
      }
      }
    ],
    ],
    "endpoint": "http://my.csource.org:1026",
    "endpoint": "http://my.csource.org:1026"
    "location": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            100.0,
            0.0
          ],
          [
            101.0,
            0.0
          ],
          [
            101.0,
            1.0
          ],
          [
            100.0,
            1.0
          ],
          [
            100.0,
            0.0
          ]
        ]
      ]
    }
  }
  }
]
]
 No newline at end of file
+1 −7
Original line number Original line Diff line number Diff line
@@ -28,12 +28,6 @@
         "relationshipNames": ["isNextToBuilding"]
         "relationshipNames": ["isNextToBuilding"]
         }
         }
     ],
     ],
     "endpoint": "http://my.csource.org:1026",
     "endpoint": "http://my.csource.org:1026"
     "location": {
         "type": "Polygon",
         "coordinates": [
             [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
             [100.0, 1.0], [100.0, 0.0]] ]
     }
  }
  }
]
]
 No newline at end of file
+13 −2
Original line number Original line Diff line number Diff line
@@ -375,7 +375,11 @@ Check Response Body Containing Attribute element
    Should Be Empty    ${comparison_result}    msg=${comparison_result.pretty()}
    Should Be Empty    ${comparison_result}    msg=${comparison_result.pretty()}


Check Response Body Containing List Containing Context Source Registrations elements
Check Response Body Containing List Containing Context Source Registrations elements
    [Arguments]    ${expectation_file_path}    ${expected_context_source_registrations_ids}    ${response_body}
    [Arguments]
    ...    ${expectation_file_path}
    ...    ${expected_context_source_registrations_ids}
    ...    ${response_body}
    ...    ${ignore_default}=${True}
    ${expected_context_source_registrations_payload}=    Load JSON From File
    ${expected_context_source_registrations_payload}=    Load JSON From File
    ...    ${EXECDIR}/data/${expectation_file_path}
    ...    ${EXECDIR}/data/${expectation_file_path}
    ${index}=    Set Variable    0
    ${index}=    Set Variable    0
@@ -386,10 +390,17 @@ Check Response Body Containing List Containing Context Source Registrations elem
        ...    ${expected_context_source_registration_id}
        ...    ${expected_context_source_registration_id}
        ${index}=    Evaluate    ${index} + 1
        ${index}=    Evaluate    ${index} + 1
    END
    END

    ${ignored_attributes}=    Create List    ${status_regex_expr}

    IF    ${ignore_default}
        Append To List    ${ignored_attributes}    mode    operations
    END

    ${comparison_result}=    Compare Dictionaries Ignoring Keys
    ${comparison_result}=    Compare Dictionaries Ignoring Keys
    ...    ${expected_context_source_registrations_payload}
    ...    ${expected_context_source_registrations_payload}
    ...    ${response_body}
    ...    ${response_body}
    ...    ${EMPTY}
    ...    ${ignored_attributes}
    ...    group_by=id
    ...    group_by=id
    Should Be Empty    ${comparison_result}    msg=${comparison_result.pretty()}
    Should Be Empty    ${comparison_result}    msg=${comparison_result.pretty()}