From b3a84df13492788234b83413d3a0fba1f777143d Mon Sep 17 00:00:00 2001 From: liangxin1300 Date: Mon, 5 Dec 2022 11:11:49 +0800 Subject: [PATCH] Dev: unittest: Add unit test for utils.compatible_role --- test/unittests/test_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unittests/test_utils.py b/test/unittests/test_utils.py index ec85393dd8..7e99cecac8 100644 --- a/test/unittests/test_utils.py +++ b/test/unittests/test_utils.py @@ -1729,3 +1729,7 @@ def test_handle_role_for_ocf_1_1_return(mock_support): def test_handle_role_for_ocf_1_1_return_not_role(): assert utils.handle_role_for_ocf_1_1("test", name='other') == "test" + + +def test_compatible_role(): + assert utils.compatible_role("Slave", "Unpromoted") is True