def testToken(self):
        request = flickr.requestCheckToken(TOKEN)
        resp = get_resp(request)

        t = flickr.parseCheckToken(resp)
        user = t.user
        self.assertNotEqual(user.username,"")
        self.assertNotEqual(user.nsid,"")
    def testToken(self):
        request = flickr.requestCheckToken(TOKEN)
        resp = get_resp(request)

        t = flickr.parseCheckToken(resp)
        user = t.user
        self.assertNotEqual(user.username, "")
        self.assertNotEqual(user.nsid, "")
    def testGroupMembership(self):
        token_req = flickr.requestCheckToken(TOKEN)

        resp = get_resp(token_req)
        user = flickr.parseCheckToken(resp).user
                
        nsid = user.nsid
        groups_req = flickr.requestPeopleGetPublicGroups(nsid)
        resp = get_resp(groups_req)
        groups = flickr.parsePeopleGetPublicGroups(resp)
    
        gf4d = [g for g in groups if g.nsid == flickr.GF4D_GROUP]
        if len(gf4d) == 0:
            # current user is not a member of gf4d group
            print "\nYou're not a member of the Gnofract 4D group. You should join!"
    def testGroupMembership(self):
        token_req = flickr.requestCheckToken(TOKEN)

        resp = get_resp(token_req)
        user = flickr.parseCheckToken(resp).user

        nsid = user.nsid
        groups_req = flickr.requestPeopleGetPublicGroups(nsid)
        resp = get_resp(groups_req)
        groups = flickr.parsePeopleGetPublicGroups(resp)

        gf4d = [g for g in groups if g.nsid == flickr.GF4D_GROUP]
        if len(gf4d) == 0:
            # current user is not a member of gf4d group
            print "\nYou're not a member of the Gnofract 4D group. You should join!"