acs::test::reply_has_status_code (public)
acs::test::reply_has_status_code [ -prefix prefix ] dict status_code
Defined in packages/acs-automated-testing/tcl/aa-test-procs.tcl
Convenience function for test cases to check, whether the reply has the given status code.
- Switches:
- -prefix (optional)
- prefix for logging
- Parameters:
- dict (required)
- request reply dict, containing at least the request status
- status_code (required)
- expected HTTP status codes
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- webtest_example, password_recovery_page, front_page_1, ad_context_bar_multirow, create_form_with_form_instance, create_form_with_numeric, form_validate, nested_self_references
Source code: set result [expr {[dict get $dict status] == $status_code}] if {$result} { aa_true "${prefix}Reply has status code $status_code" $result } else { aa_true "${prefix}Reply expected status code $status_code but got [dict get $dict status] (<a href='[detail_link $dict]'>Details</a>)" $result } return $resultXQL Not present: Generic, PostgreSQL, Oracle