(self, seen, actual, expect, what)
| 13 | self._warning_message = data |
| 14 | |
| 15 | def _check(self, seen, actual, expect, what): |
| 16 | if seen: |
| 17 | if actual.find(expect) == -1: |
| 18 | msg = 'ERROR: %s message does not contain "%s" got \n"%s"' \ |
| 19 | % (what, expect, self.error_message) |
| 20 | raise RuntimeError(msg) |
| 21 | else: |
| 22 | what = what.lower() |
| 23 | msg = 'ERROR: Failed to catch any %s. ' \ |
| 24 | 'Expected the %s message to contain "%s"' \ |
| 25 | % (what, what, expect) |
| 26 | raise RuntimeError(msg) |
| 27 | self.reset() |
| 28 | |
| 29 | def check_error(self, expect): |
| 30 | self._check(self.saw_error, self.error_message, expect, 'Error') |
no test coverage detected