def test_get_perms_anonymous(self): auth = UnixAuthorizer(global_perm='elr', anonymous_user=self.get_current_user()) self.assertTrue('e' in auth.get_perms('anonymous')) self.assertFalse('w' in auth.get_perms('anonymous')) warnings.filterwarnings("ignore") auth.override_user('anonymous', perm='w') warnings.resetwarnings() self.assertTrue('w' in auth.get_perms('anonymous'))
def test_get_perms_anonymous(self): auth = UnixAuthorizer( global_perm='elr', anonymous_user=self.get_current_user()) self.assertTrue('e' in auth.get_perms('anonymous')) self.assertFalse('w' in auth.get_perms('anonymous')) warnings.filterwarnings("ignore") auth.override_user('anonymous', perm='w') warnings.resetwarnings() self.assertTrue('w' in auth.get_perms('anonymous'))