(mock_stderr, mock_stdout)
| 71 | @patch('sshuttle.helpers.sys.stdout') |
| 72 | @patch('sshuttle.helpers.sys.stderr') |
| 73 | def test_debug2(mock_stderr, mock_stdout): |
| 74 | sshuttle.helpers.debug2("message") |
| 75 | assert mock_stdout.mock_calls == [ |
| 76 | call.flush(), |
| 77 | ] |
| 78 | assert mock_stderr.mock_calls == [ |
| 79 | call.write('prefix: message\n'), |
| 80 | call.flush(), |
| 81 | ] |
| 82 | |
| 83 | |
| 84 | @patch('sshuttle.helpers.logprefix', new='prefix: ') |