From e0145649b9ff7884d04cfc4fd110e537a457dc84 Mon Sep 17 00:00:00 2001 From: alsmirnov Date: Fri, 22 Nov 2024 13:26:42 +0400 Subject: [PATCH] fix tests --- .../plugins/modules/test_api_find_and_modify.py | 14 ++++++++++++++ tests/unit/plugins/modules/test_api_info.py | 8 ++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/unit/plugins/modules/test_api_find_and_modify.py b/tests/unit/plugins/modules/test_api_find_and_modify.py index 2f47af4f..e6eb00bc 100644 --- a/tests/unit/plugins/modules/test_api_find_and_modify.py +++ b/tests/unit/plugins/modules/test_api_find_and_modify.py @@ -620,6 +620,8 @@ def test_change_remove_generic(self): 'comment': 'defconf', 'protocol': 'icmp', 'disabled': False, + 'log': False, + 'log-prefix': '', }, { '.id': '*3', @@ -627,6 +629,8 @@ def test_change_remove_generic(self): 'chain': 'input', 'comment': 'defconf', 'disabled': False, + 'log': False, + 'log-prefix': '', }, { '.id': '*4', @@ -634,6 +638,8 @@ def test_change_remove_generic(self): 'chain': 'input', 'comment': 'defconf', 'disabled': False, + 'log': False, + 'log-prefix': '', }, { '.id': '*7', @@ -642,6 +648,8 @@ def test_change_remove_generic(self): 'comment': 'defconf', 'disabled': False, 'in-interface': 'wan', + 'log': False, + 'log-prefix': '', }, { '.id': '*8', @@ -650,6 +658,8 @@ def test_change_remove_generic(self): 'comment': 'defconf', 'connection-state': 'established', 'disabled': False, + 'log': False, + 'log-prefix': '', }, { '.id': '*9', @@ -658,6 +668,8 @@ def test_change_remove_generic(self): 'comment': 'defconf', 'connection-state': 'related', 'disabled': False, + 'log': False, + 'log-prefix': '', }, { '.id': '*A', @@ -666,6 +678,8 @@ def test_change_remove_generic(self): 'comment': 'defconf', 'connection-status': 'invalid', 'disabled': False, + 'log': False, + 'log-prefix': '', }, ]) self.assertEqual(result['match_count'], 3) diff --git a/tests/unit/plugins/modules/test_api_info.py b/tests/unit/plugins/modules/test_api_info.py index ae08301a..1c9d0141 100644 --- a/tests/unit/plugins/modules/test_api_info.py +++ b/tests/unit/plugins/modules/test_api_info.py @@ -229,8 +229,8 @@ def test_disabled_exclamation(self, mock_compose_api_path): '!jump-target': None, '!layer7-protocol': None, '!limit': None, - '!log': False, - '!log-prefix': '', + '!log': None, + '!log-prefix': None, '!nth': None, '!out-bridge-port': None, '!out-bridge-port-list': None, @@ -318,8 +318,8 @@ def test_disabled_null_value(self, mock_compose_api_path): 'jump-target': None, 'layer7-protocol': None, 'limit': None, - 'log': False, - 'log-prefix': '', + 'log': None, + 'log-prefix': None, 'nth': None, 'out-bridge-port': None, 'out-bridge-port-list': None,