Пример #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')
Пример #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')
Пример #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')
Пример #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')
Пример #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')
Пример #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')
Пример #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')
Пример #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')
Пример #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')
Пример #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')