def test_oauth_only_when_user_is_not_logged_in(self): self.oauth_stub.login('*****@*****.**', 'jh') self.assertEquals(get_cur_user().email(), '*****@*****.**')
def test_none_on_logout(self): user = get_cur_user() self.assertIsNone(user)
def test_users_first(self): user_login('*****@*****.**', 'ak') self.oauth_stub.login('*****@*****.**', 'jh') self.assertEquals(get_cur_user().email(), '*****@*****.**')
def current_user_is_admin(): user = get_cur_user() return is_admin_user(user)