def test_ace_list_success(self): share = UnityCifsShare(cli=t_rest(), _id='SMBShare_5') ace_list = share.get_ace_list() assert_that(len(ace_list), equal_to(2)) ace = ace_list[0] assert_that(ace.access_type, equal_to(ACEAccessTypeEnum.GRANT))
def test_sid_list(self): share = UnityCifsShare(cli=t_rest(), _id='SMBShare_5') ace_list = share.get_ace_list() assert_that( ace_list.sid_list, only_contains('S-1-5-15-be80fa7-8ddad211-d49ba5f9-45e', 'S-1-5-15-be80fa7-8ddad211-d49ba5f9-1f4'))
def test_get_ace_list(self): share = UnityCifsShare(cli=t_rest(), _id='SMBShare_8') access_list = share.get_ace_list() s1 = 'S-1-5-15-be80fa7-8ddad211-d49ba5f9-1f4' s2 = 'S-1-5-15-be80fa7-8ddad211-d49ba5f9-467' assert_that(access_list[ACEAccessLevelEnum.FULL], only_contains(s1, s2)) assert_that(len(access_list[ACEAccessLevelEnum.FULL]), equal_to(2)) assert_that(len(access_list[ACEAccessLevelEnum.READ]), equal_to(0)) assert_that(len(access_list[ACEAccessLevelEnum.WRITE]), equal_to(0))