summaryrefslogtreecommitdiffstats
path: root/tests/client/test_methods_nat.py
diff options
context:
space:
mode:
authorFata Nugraha <fata.nugraha@grabtaxi.com>2023-08-04 19:51:03 +0700
committerBrian May <brian@linuxpenguins.xyz>2023-08-07 20:00:32 +1000
commit998e5c58491a6bc88d03682e680b65381f59f7f4 (patch)
tree1cb07cfa05b645ce13cbf6afe5d9a795eaff1164 /tests/client/test_methods_nat.py
parent7c140daf0731887874610bc454809539828308e6 (diff)
Fix tests
Diffstat (limited to 'tests/client/test_methods_nat.py')
-rw-r--r--tests/client/test_methods_nat.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/client/test_methods_nat.py b/tests/client/test_methods_nat.py
index 61b74b5..218b629 100644
--- a/tests/client/test_methods_nat.py
+++ b/tests/client/test_methods_nat.py
@@ -101,6 +101,7 @@ def test_setup_firewall(mock_ipt_chain_exists, mock_ipt):
(AF_INET6, 128, True, u'2404:6800:4004:80c::101f', 80, 80)],
False,
None,
+ None,
'0x01')
assert mock_ipt_chain_exists.mock_calls == [
@@ -142,6 +143,7 @@ def test_setup_firewall(mock_ipt_chain_exists, mock_ipt):
(AF_INET, 32, True, u'1.2.3.66', 8080, 8080)],
True,
None,
+ None,
'0x01')
assert str(excinfo.value) == 'UDP not supported by nat method_name'
assert mock_ipt_chain_exists.mock_calls == []
@@ -155,6 +157,7 @@ def test_setup_firewall(mock_ipt_chain_exists, mock_ipt):
(AF_INET, 32, True, u'1.2.3.66', 8080, 8080)],
False,
None,
+ None,
'0x01')
assert mock_ipt_chain_exists.mock_calls == [
call(AF_INET, 'nat', 'sshuttle-1025')
@@ -182,7 +185,7 @@ def test_setup_firewall(mock_ipt_chain_exists, mock_ipt):
mock_ipt_chain_exists.reset_mock()
mock_ipt.reset_mock()
- method.restore_firewall(1025, AF_INET, False, None)
+ method.restore_firewall(1025, AF_INET, False, None, None)
assert mock_ipt_chain_exists.mock_calls == [
call(AF_INET, 'nat', 'sshuttle-1025')
]
@@ -197,7 +200,7 @@ def test_setup_firewall(mock_ipt_chain_exists, mock_ipt):
mock_ipt_chain_exists.reset_mock()
mock_ipt.reset_mock()
- method.restore_firewall(1025, AF_INET6, False, None)
+ method.restore_firewall(1025, AF_INET6, False, None,)
assert mock_ipt_chain_exists.mock_calls == [
call(AF_INET6, 'nat', 'sshuttle-1025')
]