Build and runs a multi-line regular expression against both the shell's stdout and rpc file contents to ensure the expected data about the hs2 rpc calls was outputted.
(check_desc, regex_lines)
| 1664 | .format(stdout_data_rpc_only, rpc_file_data) |
| 1665 | |
| 1666 | def check_multiline(check_desc, regex_lines): |
| 1667 | """Build and runs a multi-line regular expression against both the |
| 1668 | shell's stdout and rpc file contents to ensure the expected data about |
| 1669 | the hs2 rpc calls was outputted.""" |
| 1670 | the_re = re.compile("^" + "\n".join(regex_lines) + "$", re.MULTILINE) |
| 1671 | assert the_re.search(stdout_data), \ |
| 1672 | "'{0}' assert failed in stdout: \n{1}" \ |
| 1673 | .format(check_desc, stdout_data) |
| 1674 | assert the_re.search(rpc_file_data), \ |
| 1675 | "'{0}' assert failed in the rpc file contents: \n{1}" \ |
| 1676 | .format(check_desc, rpc_file_data) |
| 1677 | |
| 1678 | check_multiline("Open Session Request", |
| 1679 | [ |