diff options
Diffstat (limited to 'test/functional/lib/rspamd.robot')
-rw-r--r-- | test/functional/lib/rspamd.robot | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/test/functional/lib/rspamd.robot b/test/functional/lib/rspamd.robot index e310db4b5..6487a2e11 100644 --- a/test/functional/lib/rspamd.robot +++ b/test/functional/lib/rspamd.robot @@ -46,8 +46,15 @@ Check Rspamc Match String Do Not Expect Symbol [Arguments] ${symbol} - ${passed} = Run Keyword And Return Status Expect Symbol ${symbol} - Run Keyword If ${passed} Fail Unexpected symbol ${symbol} was found in result + Dictionary Should Not Contain Key ${SCAN_RESULT}[symbols] ${symbol} + ... msg=Symbol ${symbol} was not expected to be found in result + +Do Not Expect Symbols + [Arguments] @{symbols} + FOR ${symbol} IN @{symbols} + Dictionary Should Not Contain Key ${SCAN_RESULT}[symbols] ${symbol} + ... msg=Symbol ${symbol} was not expected to be found in result + END Generic Setup [Arguments] @{vargs} &{kwargs} @@ -103,10 +110,20 @@ Expect Symbol With Option Expect Symbol With Score [Arguments] ${symbol} ${score} - Expect Symbol ${symbol} + Dictionary Should Contain Key ${SCAN_RESULT}[symbols] ${symbol} + ... msg=Symbol ${symbol} wasn't found in result Should Be Equal As Numbers ${SCAN_RESULT}[symbols][${symbol}][score] ${score} ... msg="Symbol ${symbol} has score of ${SCAN_RESULT}[symbols][${symbol}][score] but expected ${score}" +Expect Symbols With Scores + [Arguments] &{symscores} + FOR ${key} ${value} IN &{symscores} + Dictionary Should Contain Key ${SCAN_RESULT}[symbols] ${key} + ... msg=Symbol ${key} wasn't found in result + Should Be Equal As Numbers ${SCAN_RESULT}[symbols][${key}][score] ${value} + ... msg="Symbol ${key} has score of ${SCAN_RESULT}[symbols][${key}][score] but expected ${value}" + END + Expect Symbol With Score And Exact Options [Arguments] ${symbol} ${score} @{options} Expect Symbol With Exact Options ${symbol} @{options} |