Esempio n. 1
0
 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()
Esempio n. 2
0
 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()
Esempio n. 3
0
 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
Esempio n. 4
0
 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