Commit 6a394dea authored by vieira's avatar vieira

Fixes missing comma from tuple in pf tests

parent 83d5c59a
...@@ -156,7 +156,7 @@ def test_firewall_command_openbsd(mock_pf_get_dev, mock_ioctl, mock_stdout): ...@@ -156,7 +156,7 @@ def test_firewall_command_openbsd(mock_pf_get_dev, mock_ioctl, mock_stdout):
def pfctl(args, stdin=None): def pfctl(args, stdin=None):
if args == '-s Interfaces -i lo -v': if args == '-s Interfaces -i lo -v':
return (b'lo0 (skip)') return (b'lo0 (skip)',)
if args == '-s all': if args == '-s all':
return (b'INFO:\nStatus: Disabled\nanother mary had a little lamb\n', return (b'INFO:\nStatus: Disabled\nanother mary had a little lamb\n',
b'little lamb\n') b'little lamb\n')
...@@ -195,6 +195,7 @@ def test_setup_firewall_darwin(mock_pf_get_dev, mock_ioctl, mock_pfctl): ...@@ -195,6 +195,7 @@ def test_setup_firewall_darwin(mock_pf_get_dev, mock_ioctl, mock_pfctl):
] ]
assert mock_pfctl.mock_calls == [ assert mock_pfctl.mock_calls == [
call('-s Interfaces -i lo -v'), call('-s Interfaces -i lo -v'),
call('-f /dev/stdin', b'pass on lo\n'),
call('-s all'), call('-s all'),
call('-a sshuttle6-1024 -f /dev/stdin', call('-a sshuttle6-1024 -f /dev/stdin',
b'table <forward_subnets> {' b'table <forward_subnets> {'
...@@ -243,6 +244,7 @@ def test_setup_firewall_darwin(mock_pf_get_dev, mock_ioctl, mock_pfctl): ...@@ -243,6 +244,7 @@ def test_setup_firewall_darwin(mock_pf_get_dev, mock_ioctl, mock_pfctl):
] ]
assert mock_pfctl.mock_calls == [ assert mock_pfctl.mock_calls == [
call('-s Interfaces -i lo -v'), call('-s Interfaces -i lo -v'),
call('-f /dev/stdin', b'pass on lo\n'),
call('-s all'), call('-s all'),
call('-a sshuttle-1025 -f /dev/stdin', call('-a sshuttle-1025 -f /dev/stdin',
b'table <forward_subnets> {!1.2.3.66/32,1.2.3.0/24}\n' b'table <forward_subnets> {!1.2.3.66/32,1.2.3.0/24}\n'
...@@ -393,6 +395,7 @@ def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl): ...@@ -393,6 +395,7 @@ def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl):
] ]
assert mock_pfctl.mock_calls == [ assert mock_pfctl.mock_calls == [
call('-s Interfaces -i lo -v'), call('-s Interfaces -i lo -v'),
call('-f /dev/stdin', b'match on lo\n'),
call('-s all'), call('-s all'),
call('-a sshuttle6-1024 -f /dev/stdin', call('-a sshuttle6-1024 -f /dev/stdin',
b'table <forward_subnets> {' b'table <forward_subnets> {'
...@@ -437,6 +440,7 @@ def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl): ...@@ -437,6 +440,7 @@ def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl):
] ]
assert mock_pfctl.mock_calls == [ assert mock_pfctl.mock_calls == [
call('-s Interfaces -i lo -v'), call('-s Interfaces -i lo -v'),
call('-f /dev/stdin', b'match on lo\n'),
call('-s all'), call('-s all'),
call('-a sshuttle-1025 -f /dev/stdin', call('-a sshuttle-1025 -f /dev/stdin',
b'table <forward_subnets> {!1.2.3.66/32,1.2.3.0/24}\n' b'table <forward_subnets> {!1.2.3.66/32,1.2.3.0/24}\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment