コード例 #1
0
ファイル: test_iptables.py プロジェクト: saarpaz/tcconfig
 def test_exception(
         self, mark_id, source, destination, chain, protocol, line_number,
         expected):
     mark = IptablesMangleMark(
         mark_id=mark_id, source=source, destination=destination,
         chain=chain, protocol=protocol, line_number=line_number)
     with pytest.raises(expected):
         mark.to_delete_command()
コード例 #2
0
ファイル: test_iptables.py プロジェクト: thombashi/tcconfig
 def test_exception(self, mark_id, source, destination, chain, protocol, line_number, expected):
     mark = IptablesMangleMark(
         mark_id=mark_id,
         source=source,
         destination=destination,
         chain=chain,
         protocol=protocol,
         line_number=line_number,
     )
     with pytest.raises(expected):
         mark.to_delete_command()
コード例 #3
0
ファイル: test_iptables.py プロジェクト: saarpaz/tcconfig
 def test_normal(
         self, mark_id, source, destination, chain, protocol, line_number,
         expected):
     mark = IptablesMangleMark(
         mark_id=mark_id, source=_DEF_SRC, destination=_DEF_DST,
         chain=chain, protocol=protocol, line_number=line_number)
     assert mark.to_delete_command() == expected
コード例 #4
0
ファイル: test_iptables.py プロジェクト: thombashi/tcconfig
 def test_normal(self, mark_id, source, destination, chain, protocol, line_number, expected):
     mark = IptablesMangleMark(
         mark_id=mark_id,
         source=_DEF_SRC,
         destination=_DEF_DST,
         chain=chain,
         protocol=protocol,
         line_number=line_number,
     )
     assert mark.to_delete_command() == expected