Skip to content

Commit ddbbcce

Browse files
author
Martin Vrachev
committed
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 <mvrachev@vmware.com>
1 parent 01acaa4 commit ddbbcce

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/test_api.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,14 @@ def test_is_delegated_role(self) -> None:
750750

751751
def test_is_delegated_role_in_succinct_roles(self) -> None:
752752
succinct_roles = SuccinctRoles([], 1, 5, "bin")
753-
false_role_name_examples = ["foo", "bin-", "bin-s", "bin-20", "bin-100"]
753+
false_role_name_examples = [
754+
"foo",
755+
"bin-",
756+
"bin-s",
757+
"bin-0t",
758+
"bin-20",
759+
"bin-100",
760+
]
754761
for role_name in false_role_name_examples:
755762
msg = f"Error for {role_name}"
756763
self.assertFalse(succinct_roles.is_delegated_role(role_name), msg)

0 commit comments

Comments
 (0)