mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-22 16:03:57 +01:00
Add another test.
This commit is contained in:
parent
3db38c992a
commit
ba60d22478
@ -11,6 +11,7 @@ import sshuttle.helpers
|
||||
@patch('sshuttle.helpers.sys.stderr')
|
||||
def test_log(mock_stderr, mock_stdout):
|
||||
sshuttle.helpers.log("message")
|
||||
sshuttle.helpers.log("abc")
|
||||
sshuttle.helpers.log("message 1\n")
|
||||
sshuttle.helpers.log("message 2\nline2\nline3\n")
|
||||
sshuttle.helpers.log("message 3\nline2\nline3")
|
||||
@ -19,10 +20,13 @@ def test_log(mock_stderr, mock_stdout):
|
||||
call.flush(),
|
||||
call.flush(),
|
||||
call.flush(),
|
||||
call.flush(),
|
||||
]
|
||||
assert mock_stderr.mock_calls == [
|
||||
call.write('prefix: message'),
|
||||
call.flush(),
|
||||
call.write('prefix: abc'),
|
||||
call.flush(),
|
||||
call.write('prefix: message 1\n'),
|
||||
call.flush(),
|
||||
call.write('prefix: message 2\n'),
|
||||
|
Loading…
Reference in New Issue
Block a user