mirror of
https://github.com/samba-team/samba.git
synced 2025-03-07 00:58:40 +03:00
pytest:sid_strings: add a superclass, allowing for derivatives
This will allow e.g. a suite of tests that assert Windows behaviour that we might not choose to follow. Because @DynamicTestCase will mangle the class as it finds it, we can't use SidStringTests itself as a superclass for others. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
5c4f4dc9ea
commit
5805dcf3eb
@ -41,8 +41,7 @@ sys.path.insert(0, 'bin/python')
|
||||
os.environ['PYTHONUNBUFFERED'] = '1'
|
||||
|
||||
|
||||
@DynamicTestCase
|
||||
class SidStringTests(TestCase):
|
||||
class SidStringBase(TestCase):
|
||||
@classmethod
|
||||
def setUpDynamicTestCases(cls):
|
||||
if env_get_var_value('CHECK_ALL_COMBINATIONS',
|
||||
@ -158,6 +157,10 @@ cn: {object_name}
|
||||
|
||||
self.assertEqual(expected_sid, owner_sid)
|
||||
|
||||
|
||||
@DynamicTestCase
|
||||
class SidStringTests(SidStringBase):
|
||||
|
||||
cases = {
|
||||
'AA': 'S-1-5-32-579',
|
||||
'AC': 'S-1-15-2-1',
|
||||
|
Loading…
x
Reference in New Issue
Block a user