Exemple #1
0
 def test_remove_role(self):
     assert_equal(TestRoles.get_roles('system', user_ref='testsysadmin'),
                  ['"testsysadmin" is "admin" on "System"'])
     RightsTool.make_or_remove_roles('remove', 'testsysadmin', 'admin',
                                     'system')
     assert_equal(TestRoles.get_roles('system', user_ref='testsysadmin'),
                  [])
Exemple #2
0
 def test_make_role(self):
     assert_equal(TestRoles.get_roles('annakarenina', user_ref='tester'),
                  [])
     RightsTool.make_or_remove_roles('make', 'tester', 'admin',
                                     'annakarenina')
     assert_equal(TestRoles.get_roles('annakarenina', user_ref='tester'),
                  [u'"tester" is "admin" on "annakarenina"'])
Exemple #3
0
 def test_remove_role(self):
     assert_equal(TestRoles.get_roles('system', user_ref='testsysadmin'), ['"testsysadmin" is "admin" on "System"'])
     RightsTool.make_or_remove_roles('remove', 'testsysadmin', 'admin', 'system')
     assert_equal(TestRoles.get_roles('system', user_ref='testsysadmin'), [])
Exemple #4
0
 def test_make_role(self):
     assert_equal(TestRoles.get_roles('annakarenina', user_ref='tester'), [])
     RightsTool.make_or_remove_roles('make', 'tester', 'admin', 'annakarenina')
     assert_equal(TestRoles.get_roles('annakarenina', user_ref='tester'), [u'"tester" is "admin" on "annakarenina"'])