Example #1
0
 def test_103_action_return(self):
     """Check action GOTO"""
     action = {"type": "RETURN"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert (str == 'return')
Example #2
0
 def test_102_action_jump(self):
     """Check action JUMP"""
     action = {"type": "JUMP", "chain": "target"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert (str == 'jump target')
Example #3
0
 def test_103_action_goto(self):
     """Check action GOTO"""
     action = {"type": "GOTO", "chain": "target"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert (str == 'goto target')
Example #4
0
 def test_100_action_reject(self):
     """Check action REJECT"""
     action = {"type": "REJECT"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert (str == 'reject')
Example #5
0
 def test_101_action_accept(self):
     """Check action ACCEPT"""
     action = {"type": "ACCEPT"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert (str == 'accept')
Example #6
0
 def test_103_action_return(self):
     """Check action GOTO"""
     action = {"type": "RETURN"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert(str == 'return')
Example #7
0
 def test_103_action_goto(self):
     """Check action GOTO"""
     action = {"type": "GOTO", "chain":"target"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert(str == 'goto target')
Example #8
0
 def test_102_action_jump(self):
     """Check action JUMP"""
     action = {"type": "JUMP", "chain":"target"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert(str == 'jump target')
Example #9
0
 def test_101_action_accept(self):
     """Check action ACCEPT"""
     action = {"type": "ACCEPT"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert(str == 'accept')
Example #10
0
 def test_100_action_reject(self):
     """Check action REJECT"""
     action = {"type": "REJECT"}
     str = nftables_util.action_expression(action, "inet")
     print(str)
     assert(str == 'reject')