mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-05-08 18:14:28 +02:00
Don't use nested.
Is Python 2.x only. Not supported under Python 3.x.
This commit is contained in:
parent
cf0aaa7134
commit
9d443e4155
@ -1,5 +1,4 @@
|
|||||||
from mock import Mock, patch, call
|
from mock import Mock, patch, call
|
||||||
from contextlib import nested
|
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
@ -63,11 +62,9 @@ def test_rewrite_etc_hosts():
|
|||||||
assert filecmp.cmp("tmp/hosts.orig", "tmp/hosts", shallow=False) is True
|
assert filecmp.cmp("tmp/hosts.orig", "tmp/hosts", shallow=False) is True
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
@patch('sshuttle.firewall.setup_daemon')
|
||||||
with nested(
|
@patch('sshuttle.firewall.get_method')
|
||||||
patch('sshuttle.firewall.setup_daemon'),
|
def test_main(mock_get_method, mock_setup_daemon):
|
||||||
patch('sshuttle.firewall.get_method')
|
|
||||||
) as (mock_setup_daemon, mock_get_method):
|
|
||||||
stdin, stdout = setup_daemon()
|
stdin, stdout = setup_daemon()
|
||||||
mock_setup_daemon.return_value = stdin, stdout
|
mock_setup_daemon.return_value = stdin, stdout
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user