summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/py/nft-test.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index edc0b4b1..c02294ac 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.py
@@ -855,10 +855,7 @@ def rule_add(rule, filename, lineno, force_all_family_option, filename_path):
json_output = json.loads(json_output)
for item in json_output["nftables"]:
if "rule" in item:
- if "handle" in item["rule"]:
- del(item["rule"]["handle"])
- if "position" in item["rule"]:
- del(item["rule"]["position"])
+ del(item["rule"]["handle"])
json_output = item["rule"]
break
json_input = json.dumps(json_output["expr"], sort_keys = True)
@@ -917,10 +914,7 @@ def rule_add(rule, filename, lineno, force_all_family_option, filename_path):
json_output = json.loads(json_output)
for item in json_output["nftables"]:
if "rule" in item:
- if "handle" in item["rule"]:
- del(item["rule"]["handle"])
- if "position" in item["rule"]:
- del(item["rule"]["position"])
+ del(item["rule"]["handle"])
json_output = item["rule"]
break
json_output = json.dumps(json_output["expr"], sort_keys = True)