Describe implication of upstream ICU-22610
[Samba.git] / python / samba / tests / sddl_conditional_ace.py
blobd7c6c7dd6213477266d9771f92ffa444bc55e006
1 # Unix SMB/CIFS implementation.
2 # Copyright (C) Volker Lendecke <vl@samba.org> 2021
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 """Tests for SDDL conditional ACES."""
20 from .sddl import SddlDecodeEncodeBase
21 from samba.tests import DynamicTestCase
22 from pathlib import Path
24 STRINGS_DIR = Path(__name__).parent.parent.parent / 'libcli/security/tests/data'
26 @DynamicTestCase
27 class SddlConditionalAces(SddlDecodeEncodeBase):
28 strings_dir = STRINGS_DIR
29 name = "conditional_aces"
30 should_succeed = True
33 @DynamicTestCase
34 class SddlConditionalAcesShouldFail(SddlDecodeEncodeBase):
35 strings_dir = STRINGS_DIR
36 name = "conditional_aces_should_fail"
37 should_succeed = False
40 @DynamicTestCase
41 class SddlConditionalAcesWindowsOnly(SddlDecodeEncodeBase):
42 strings_dir = STRINGS_DIR
43 name = "conditional_aces_windows_only"
44 should_succeed = False
47 @DynamicTestCase
48 class SddlConditionalAcesCaseInsensitive(SddlDecodeEncodeBase):
49 strings_dir = STRINGS_DIR
50 name = "conditional_aces_case_insensitive"
51 should_succeed = True
52 case_insensitive = True