From ddbbcce432024149a3e65fbed58f4ee9d7c93979 Mon Sep 17 00:00:00 2001 From: Martin Vrachev Date: Fri, 24 Jun 2022 16:48:56 +0300 Subject: [PATCH] SuccinctRoles.is_delegated_role() add test case Add a test case when there is a bin name with the desired prefix, but which cannot be cast to a hexadecimal number. Signed-off-by: Martin Vrachev --- tests/test_api.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 530ca55ad1..1fd0a44689 100755 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -750,7 +750,14 @@ def test_is_delegated_role(self) -> None: def test_is_delegated_role_in_succinct_roles(self) -> None: succinct_roles = SuccinctRoles([], 1, 5, "bin") - false_role_name_examples = ["foo", "bin-", "bin-s", "bin-20", "bin-100"] + false_role_name_examples = [ + "foo", + "bin-", + "bin-s", + "bin-0t", + "bin-20", + "bin-100", + ] for role_name in false_role_name_examples: msg = f"Error for {role_name}" self.assertFalse(succinct_roles.is_delegated_role(role_name), msg)