Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(69)  |  Call(69)  |  Derive(0)  |  Import(0)

src/b/a/babble.client-2.0/src/babble/client/tests/test_chat.py   babble.client(Download)
 
        online_users = utils.get_online_usernames(portal)
        self.assertEquals(online_users, [])
 
        online_members = utils.get_online_members(portal)
        self.assertEquals(online_members, [])
 
        self.logout()
        resp = json.loads(server.confirmAsOnline(None))
        self.assertEquals(resp['status'], config.ERROR)
        server = utils.getConnection(self.portal)
        resp = json.loads(server.confirmAsOnline(username1))
        self.assertEquals(resp['status'], config.SUCCESS)
 
        online_users = utils.get_online_usernames(portal)
        self.assertEquals(online_users, [username1])

src/b/a/babble.client-2.0/src/babble/client/tests/test_index.py   babble.client(Download)
        # Check that one can query for it via participants
        ps = catalog(participants='portal_owner')
        self.assertEquals(len(ps), 1)
        self.assertTrue(IUUID(ps[0].getObject()), IUUID(chatroom))
 
        # Check the indexer manually
        indexed = index.participants(chatroom)()
        self.assertEquals(indexed, ['portal_owner'])
        # Check the indexer manually
        indexed = index.participants(chatroom)()
        self.assertEquals(indexed, ['user1', 'portal_owner'])
 
        # Recatalog the object and check if one can query for the new user.
        catalog.indexObject(chatroom)
        ps = catalog(participants='user1')
        self.assertEquals(len(ps), 1)
        # Check the indexer manually
        indexed = index.participants(chatroom)()
        self.assertEquals(indexed, ['user1', 'portal_owner'])
 
        # Recatalog the object and check if one can query for the new user.

src/b/a/babble.client-2.0/src/babble/client/tests/test_portlet.py   babble.client(Download)
    def test_portlet_type_registered(self):
        portlet = getUtility(
            IPortletType,
            name="babble.client.onlinecontacts")
        self.assertEquals(portlet.addview,
        addview = mapping.restrictedTraverse('+/' + portlet.addview)
        assignment = addview.create({'header':u"Who is online?"})
        self.assertEquals(type(assignment), type(onlinecontacts.Assignment()))
        self.assertEquals(assignment.title, u"Who is online?")
 
        r.update()
        output = r.render()
        self.assertEquals(type(output),unicode)