Beispiel #1
0
  def testAccountManagement(self):
    email = '*****@*****.**'
    password = '******'
    userID = self.personBase

    self.failUnless(weave.checkNameAvailable(SERVER_BASE, userID))
    weave.createUser(SERVER_BASE, userID, password, email)

    webfingerUser = webfinger.resolveUser("*****@*****.**", atSite = SERVER_BASE)
    self.failUnless(webfingerUser != None)
    
    # By default, the webfinger should advertise an IdP and an HCard
    self.failUnless(webfingerUser.getLinks() != None)
    links = webfingerUser.getLinks()

    self.failUnless(OPENID_10_IDP_REL in links)
    self.failUnless(HCARD_PROFILE_REL in links)
    self.failUnless(OPENSOCIAL_REL in links)
    
    # Now we should be able to add a new service
    # and it should be advertised
    
    # Another for the same rel and we should get more than one
    
    # Change one of them and it works
    
    # Remove one

    # and the other
    
  def setUp(self):
    self.userID = 'weaveunittest_' + ''.join([chr(random.randint(ord('a'), ord('z'))) for i in xrange(10)])
    self.password = '******'
    self.email = '*****@*****.**'

    self.failUnless(weave.checkNameAvailable(SERVER_BASE, self.userID))
    weave.createUser(SERVER_BASE, self.userID, self.password, self.email)
    
    # Get an OpenSocial container reference
    config = opensocial.ContainerConfig(
      oauth_consumer_key='anonymous',
      oauth_consumer_secret='anonymous',
      server_rpc_base=TEST_CONFIG.server_rpc_base,
      server_rest_base=TEST_CONFIG.server_rest_base)
      
    self.container = opensocial.ContainerContext(config)		
    def setUp(self):
        self.userID = 'weaveunittest_' + ''.join(
            [chr(random.randint(ord('a'), ord('z'))) for i in xrange(10)])
        self.password = '******'
        self.email = '*****@*****.**'

        self.failUnless(weave.checkNameAvailable(SERVER_BASE, self.userID))
        weave.createUser(SERVER_BASE, self.userID, self.password, self.email)

        # Get an OpenSocial container reference
        config = opensocial.ContainerConfig(
            oauth_consumer_key='anonymous',
            oauth_consumer_secret='anonymous',
            server_rpc_base=TEST_CONFIG.server_rpc_base,
            server_rest_base=TEST_CONFIG.server_rest_base)

        self.container = opensocial.ContainerContext(config)