(self, spy, conf=None, exit_expected=False)
| 21 | return conf |
| 22 | |
| 23 | def _audit(self, spy, conf=None, exit_expected=False): |
| 24 | if conf is None: |
| 25 | conf = self._conf() |
| 26 | spy.begin() |
| 27 | |
| 28 | out = OutputBuffer() |
| 29 | if exit_expected: |
| 30 | with pytest.raises(SystemExit): |
| 31 | self.audit(out, conf) |
| 32 | else: |
| 33 | ret = self.audit(out, conf) |
| 34 | assert ret != 0 |
| 35 | |
| 36 | out.write() |
| 37 | lines = spy.flush() |
| 38 | |
| 39 | # If the last line is empty, delete it. |
| 40 | if len(lines) > 1 and lines[-1] == '': |
| 41 | del lines[-1] |
| 42 | |
| 43 | return lines |
| 44 | |
| 45 | def test_connection_unresolved(self, output_spy, virtual_socket): |
| 46 | vsocket = virtual_socket |
no test coverage detected