Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')