From a30b721880e418d6389664bbfc9bd7dc8d8b5de2 Mon Sep 17 00:00:00 2001 From: caleb Date: Mon, 8 Jul 2024 15:04:43 -0400 Subject: [PATCH] fix logic in test_300 --- tests/api2/test_300_nfs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/api2/test_300_nfs.py b/tests/api2/test_300_nfs.py index bca2adaf5492d..874149a89df61 100644 --- a/tests/api2/test_300_nfs.py +++ b/tests/api2/test_300_nfs.py @@ -1359,15 +1359,17 @@ def test_45_check_setting_runtime_debug(request): try: assert call('nfs.get_debug') == disabled assert call('nfs.set_debug', enabled) - assert call('nfs.get_debug') == enabled + debug_values = call('nfs.get_debug') + assert all((set(enabled[i]) == set(debug_values[i]) for i in debug_values)), debug_values with pytest.raises(Exception) as ve: # This should generate an ValueError exception on the system call('nfs.set_debug', failure) - assert ve.value.errno == errno.EINVAL + assert ve.value.errno == errno.EINVAL, ve finally: assert call('nfs.set_debug', disabled) - assert call('nfs.get_debug') == disabled + debug_values = call('nfs.get_debug') + assert all((set(disabled[i]) == set(debug_values[i]) for i in debug_values)), debug_values def test_46_set_bind_ip():