@@ -0,0 +1,939 @@
+#!/usr/bin/env python%0A%0A'''%0A'''%0A%0Aimport unittest%0A%0Afrom testRoot import RootClass%0A%0Afrom noink.user_db import UserDB%0Afrom noink.role_db import RoleDB%0Afrom noink.activity_table import get_activity_dict%0A%0Aclass AssignRole(RootClass):%0A%0A    def test_AssignRole(self):%0A        user_db = UserDB()%0A        role_db = RoleDB()%0A        u = user_db.add(%22jontest%22, %22pass%22, %22Jon Q. Testuser%22)%0A        g = user_db.add_group('test_group')%0A        user_db.add_to_group(u, g)%0A        r = role_db.add_role('test_role', 'test role', get_activity_dict(True))%0A        role_db.assign_role(u, g, r)%0A        all_roles_1st = set(rm.role for rm in role_db.get_roles(u))%0A        was_in_before = r in all_roles_1st%0A        role_db.revoke_role(u, g, r)%0A        all_roles_2nd = set(rm.role for rm in role_db.get_roles(u))%0A        not_in_after = r not in all_roles_2nd%0A        self.assertTrue(was_in_before and not_in_after)%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A%0A

add revoke role test