(mock_stderr, mock_stdout)
| 46 | @patch('sshuttle.helpers.sys.stdout') |
| 47 | @patch('sshuttle.helpers.sys.stderr') |
| 48 | def test_debug1(mock_stderr, mock_stdout): |
| 49 | sshuttle.helpers.debug1("message") |
| 50 | assert mock_stdout.mock_calls == [ |
| 51 | call.flush(), |
| 52 | ] |
| 53 | assert mock_stderr.mock_calls == [ |
| 54 | call.write('prefix: message\n'), |
| 55 | call.flush(), |
| 56 | ] |
| 57 | |
| 58 | |
| 59 | @patch('sshuttle.helpers.logprefix', new='prefix: ') |