From 2034bda7bc7bc74ae54d06a3b88b7df7b3711ba9 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Mon, 8 Jun 2020 12:47:29 +0200 Subject: [PATCH] Fix on check response contains keyword --- GenericKeywords.robot | 4 ++-- SRV/DNS/PlatDnsRules.robot | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GenericKeywords.robot b/GenericKeywords.robot index 189f921..ee12e8d 100644 --- a/GenericKeywords.robot +++ b/GenericKeywords.robot @@ -25,14 +25,14 @@ Should Be Present In Json List [Arguments] ${expr} ${json_field} ${json_value} Log Check if ${json_field} is present in ${expr} with the value ${json_value} :FOR ${item} IN @{expr} - \ Exit For Loop If "${item['${json_field}']}" == "${json_value}" + \ Exit For Loop If ${item[${json_field}]} == ${json_value} Log Item found ${item} [return] ${item} Should Be Present In Json [Arguments] ${expr} ${json_field} ${json_value} Log Check if ${json_field} is present in ${expr} with the value ${json_value} - Should Be Equal As Strings ${expr}['${json_field}'] ${json_value} + Should Be Equal As Strings ${expr}[${json_field}] ${json_value} Check Response Contains [Arguments] ${source} ${parameter} ${value} diff --git a/SRV/DNS/PlatDnsRules.robot b/SRV/DNS/PlatDnsRules.robot index d47a679..80a0c18 100644 --- a/SRV/DNS/PlatDnsRules.robot +++ b/SRV/DNS/PlatDnsRules.robot @@ -42,7 +42,7 @@ TC_MEC_SRV_DNS_002_OK Get individual DNS rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRule - Check Result Contains ${response['body']} dnsRuleId ${DNS_RULE_ID} + Check Response Contains ${response['body']} dnsRuleId ${DNS_RULE_ID} TC_MEC_SRV_DNS_002_NF @@ -69,7 +69,7 @@ TC_MEC_SRV_DNS_003_OK Update a DNS Rule ${APP_INSTANCE_ID} ${DNS_RULE_ID} DnsRuleUpdate Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is DnsRule - Check Result Contains ${response['body']} ipAddress ${SOME_IP_ADDRESS} + Check Response Contains ${response['body']} ipAddress ${SOME_IP_ADDRESS} TC_MEC_SRV_DNS_003_BR -- GitLab